Clean the environment.
Set locations, and the working directory …
Defining phenotypes and datasets.
Create a new analysis directory, including subdirectories.
[1] FALSE
[1] FALSE
[1] FALSE
[1] FALSE
Setting working directory and listing its contents.
[1] "/Users/slaan3/OneDrive - UMC Utrecht/PLINK/analyses/lookups/AE_20200512_COL_MKAVOUSI_MBOS_CHARGE_1000G_CAC/scRNAseq"
[1] "AESCRNA" "scRNAseq.nb.html" "scRNAseq.Rmd"
… a package-installation function …
… and load those packages.
Loading required package: readr
Loading required package: optparse
Loading required package: tools
Loading required package: dplyr
Attaching package: ‘dplyr’
The following objects are masked from ‘package:stats’:
filter, lag
The following objects are masked from ‘package:base’:
intersect, setdiff, setequal, union
Loading required package: tidyr
Loading required package: tidylog
Attaching package: ‘tidylog’
The following objects are masked from ‘package:tidyr’:
drop_na, fill, gather, pivot_longer, pivot_wider, replace_na, spread, uncount
The following objects are masked from ‘package:dplyr’:
add_count, add_tally, anti_join, count, distinct, distinct_all, distinct_at, distinct_if, filter, filter_all,
filter_at, filter_if, full_join, group_by, group_by_all, group_by_at, group_by_if, inner_join, left_join, mutate,
mutate_all, mutate_at, mutate_if, relocate, rename, rename_all, rename_at, rename_if, rename_with, right_join,
sample_frac, sample_n, select, select_all, select_at, select_if, semi_join, slice, slice_head, slice_max, slice_min,
slice_sample, slice_tail, summarise, summarise_all, summarise_at, summarise_if, summarize, summarize_all,
summarize_at, summarize_if, tally, top_frac, top_n, transmute, transmute_all, transmute_at, transmute_if, ungroup
The following object is masked from ‘package:stats’:
filter
Loading required package: naniar
data.table 1.14.0 using 1 threads (see ?getDTthreads). Latest news: r-datatable.com
**********
This installation of data.table has not detected OpenMP support. It should still work but in single-threaded mode.
This is a Mac. Please read https://mac.r-project.org/openmp/. Please engage with Apple and ask them for support. Check r-datatable.com for updates, and our Mac instructions here: https://github.com/Rdatatable/data.table/wiki/Installation. After several years of many reports of installation problems on Mac, it's time to gingerly point out that there have been no similar problems on Windows or Linux.
**********
Attaching package: ‘data.table’
The following objects are masked from ‘package:dplyr’:
between, first, last
Loading required package: tidyverse
Registered S3 methods overwritten by 'dbplyr':
method from
print.tbl_lazy
print.tbl_sql
Registered S3 method overwritten by 'cli':
method from
print.boxx spatstat.geom
── Attaching packages ──────────────────────────────────────────────────────────────────────────────────────────────── tidyverse 1.3.1 ──
✓ ggplot2 3.3.5 ✓ stringr 1.4.0
✓ tibble 3.1.2 ✓ forcats 0.5.1
✓ purrr 0.3.4
── Conflicts ─────────────────────────────────────────────────────────────────────────────────────────────────── tidyverse_conflicts() ──
x tidylog::add_count() masks dplyr::add_count()
x tidylog::add_tally() masks dplyr::add_tally()
x tidylog::anti_join() masks dplyr::anti_join()
x data.table::between() masks dplyr::between()
x tidylog::count() masks dplyr::count()
x tidylog::distinct() masks dplyr::distinct()
x tidylog::distinct_all() masks dplyr::distinct_all()
x tidylog::distinct_at() masks dplyr::distinct_at()
x tidylog::distinct_if() masks dplyr::distinct_if()
x tidylog::drop_na() masks tidyr::drop_na()
x tidylog::fill() masks tidyr::fill()
x tidylog::filter() masks dplyr::filter(), stats::filter()
x tidylog::filter_all() masks dplyr::filter_all()
x tidylog::filter_at() masks dplyr::filter_at()
x tidylog::filter_if() masks dplyr::filter_if()
x data.table::first() masks dplyr::first()
x tidylog::full_join() masks dplyr::full_join()
x tidylog::gather() masks tidyr::gather()
x tidylog::group_by() masks dplyr::group_by()
x tidylog::group_by_all() masks dplyr::group_by_all()
x tidylog::group_by_at() masks dplyr::group_by_at()
x tidylog::group_by_if() masks dplyr::group_by_if()
x tidylog::inner_join() masks dplyr::inner_join()
x dplyr::lag() masks stats::lag()
x data.table::last() masks dplyr::last()
x tidylog::left_join() masks dplyr::left_join()
x tidylog::mutate() masks dplyr::mutate()
x tidylog::mutate_all() masks dplyr::mutate_all()
x tidylog::mutate_at() masks dplyr::mutate_at()
x tidylog::mutate_if() masks dplyr::mutate_if()
x tidylog::pivot_longer() masks tidyr::pivot_longer()
x tidylog::pivot_wider() masks tidyr::pivot_wider()
x tidylog::relocate() masks dplyr::relocate()
x tidylog::rename() masks dplyr::rename()
x tidylog::rename_all() masks dplyr::rename_all()
x tidylog::rename_at() masks dplyr::rename_at()
x tidylog::rename_if() masks dplyr::rename_if()
x tidylog::rename_with() masks dplyr::rename_with()
x tidylog::replace_na() masks tidyr::replace_na()
x tidylog::right_join() masks dplyr::right_join()
x tidylog::sample_frac() masks dplyr::sample_frac()
x tidylog::sample_n() masks dplyr::sample_n()
x tidylog::select() masks dplyr::select()
x tidylog::select_all() masks dplyr::select_all()
x tidylog::select_at() masks dplyr::select_at()
x tidylog::select_if() masks dplyr::select_if()
x tidylog::semi_join() masks dplyr::semi_join()
x tidylog::slice() masks dplyr::slice()
x tidylog::slice_head() masks dplyr::slice_head()
x tidylog::slice_max() masks dplyr::slice_max()
x tidylog::slice_min() masks dplyr::slice_min()
x tidylog::slice_sample() masks dplyr::slice_sample()
x tidylog::slice_tail() masks dplyr::slice_tail()
x tidylog::spread() masks tidyr::spread()
x tidylog::summarise() masks dplyr::summarise()
x tidylog::summarise_all() masks dplyr::summarise_all()
x tidylog::summarise_at() masks dplyr::summarise_at()
x tidylog::summarise_if() masks dplyr::summarise_if()
x tidylog::summarize() masks dplyr::summarize()
x tidylog::summarize_all() masks dplyr::summarize_all()
x tidylog::summarize_at() masks dplyr::summarize_at()
x tidylog::summarize_if() masks dplyr::summarize_if()
x tidylog::tally() masks dplyr::tally()
x tidylog::top_frac() masks dplyr::top_frac()
x tidylog::top_n() masks dplyr::top_n()
x tidylog::transmute() masks dplyr::transmute()
x tidylog::transmute_all() masks dplyr::transmute_all()
x tidylog::transmute_at() masks dplyr::transmute_at()
x tidylog::transmute_if() masks dplyr::transmute_if()
x purrr::transpose() masks data.table::transpose()
x tidylog::uncount() masks tidyr::uncount()
x tidylog::ungroup() masks dplyr::ungroup()
Loading required package: knitr
Loading required package: DT
Loading required package: org.Hs.eg.db
Loading required package: AnnotationDbi
Loading required package: stats4
Loading required package: BiocGenerics
Loading required package: parallel
Attaching package: ‘BiocGenerics’
The following objects are masked from ‘package:parallel’:
clusterApply, clusterApplyLB, clusterCall, clusterEvalQ, clusterExport, clusterMap, parApply, parCapply, parLapply,
parLapplyLB, parRapply, parSapply, parSapplyLB
The following objects are masked from ‘package:dplyr’:
combine, intersect, setdiff, union
The following objects are masked from ‘package:stats’:
IQR, mad, sd, var, xtabs
The following objects are masked from ‘package:base’:
anyDuplicated, append, as.data.frame, basename, cbind, colnames, dirname, do.call, duplicated, eval, evalq, Filter,
Find, get, grep, grepl, intersect, is.unsorted, lapply, Map, mapply, match, mget, order, paste, pmax, pmax.int, pmin,
pmin.int, Position, rank, rbind, Reduce, rownames, sapply, setdiff, sort, table, tapply, union, unique, unsplit,
which.max, which.min
Loading required package: Biobase
Welcome to Bioconductor
Vignettes contain introductory material; view with 'browseVignettes()'. To cite Bioconductor, see
'citation("Biobase")', and for packages 'citation("pkgname")'.
Loading required package: IRanges
Loading required package: S4Vectors
Attaching package: ‘S4Vectors’
The following objects are masked from ‘package:data.table’:
first, second
The following object is masked from ‘package:tidylog’:
rename
The following object is masked from ‘package:tidyr’:
expand
The following objects are masked from ‘package:dplyr’:
first, rename
The following objects are masked from ‘package:base’:
expand.grid, I, unname
Attaching package: ‘IRanges’
The following object is masked from ‘package:purrr’:
reduce
The following object is masked from ‘package:data.table’:
shift
The following object is masked from ‘package:tidylog’:
slice
The following objects are masked from ‘package:dplyr’:
collapse, desc, slice
Attaching package: ‘AnnotationDbi’
The following object is masked from ‘package:tidylog’:
select
The following object is masked from ‘package:dplyr’:
select
Loading required package: mygene
Loading required package: GenomicFeatures
Loading required package: GenomeInfoDb
Loading required package: GenomicRanges
Loading required package: EnhancedVolcano
Loading required package: ggrepel
Registered S3 methods overwritten by 'ggalt':
method from
grid.draw.absoluteGrob ggplot2
grobHeight.absoluteGrob ggplot2
grobWidth.absoluteGrob ggplot2
grobX.absoluteGrob ggplot2
grobY.absoluteGrob ggplot2
Loading required package: haven
Loading required package: tableone
Loading required package: devtools
Loading required package: usethis
Attaching SeuratObject
Attaching package: ‘Seurat’
The following object is masked from ‘package:DT’:
JS
We will create a datestamp and define the Utrecht Science Park Colour Scheme.
For the ERA-CVD ‘druggable-MI-targets’ project (grantnumber: 01KL1802) we will perform two related RNA sequencing (RNAseq) experiments:
conventional (‘bulk’) RNAseq using RNA extracted from carotid plaque samples, n ± 700. As of Friday, July 16, 2021 all samples have been selected and RNA has been extracted; quality control (QC) was performed and we have a dataset of 635 samples.
single-cell RNAseq (scRNAseq) of at least n = 40 samples (20 females, 20 males). As of Friday, July 16, 2021 data is available of 40 samples (3 females, 15 males), we are extending sampling to get more female samples.
Plaque samples are derived from carotid endarterectomies as part of the Athero-Express Biobank Study which is an ongoing study in the UMC Utrecht.
Here we map the CHARGE Consortium 1000G GWAS on coronary artery calcification (CAC) susceptibility loci to the single-cell carotid plaque data. These are given in:
IndSigSNPsforSander.xlsxGeneList_15042020.xlsxlibrary(openxlsx)
CAC_gene_list <- read.xlsx(paste0(PROJECT_loc, "/SNP/Genes.xlsx"))
CAC_variants <- read.xlsx(paste0(PROJECT_loc, "/SNP/Variants.xlsx"))
DT::datatable(CAC_gene_list)
DT::datatable(CAC_variants)
NA
We will construct a list of genes to map to our scRNAseq data.
target_genes <- unlist(CAC_gene_list$Gene)
target_genes
[1] "C6orf195" "EDN1" "PHACTR1" "TBC1D7" "GFOD1" "ENPP1" "ENPP3" "IGFBP3"
[9] "AC011294.3" "MTAP" "RP11-145E5.5" "C9orf53" "CDKN2A" "CDKN2B" "ZNF485" "ZNF32"
[17] "AL137026.1" "ARID5B" "RTKN2" "CAMK2G" "VCL" "AP3M1" "ADK" "KAT6B"
[25] "DUPD1" "DUSP13" "SAMD8" "VDAC2" "COMTD1" "FGF23" "COL4A1" "COL4A2"
[33] "CHRNA5" "CHRNB4" "ADAMTS7" "MORF4L1" "CTSH" "BCAM" "PVRL2" "TOMM40"
[41] "APOE" "APOC1"
First we will load the data:
Here we load the latest dataset from our Athero-Express Single Cell RNA experiment.
scRNAseqData <- readRDS(paste0(RAWDATA, "/Seuset_40_patients/20210217_PlaqView_38_pts.RDS"))
scRNAseqData
An object of class Seurat
38835 features across 6191 samples within 2 assays
Active assay: SCT (18283 features, 3000 variable features)
1 other assay present: RNA
2 dimensional reductions calculated: pca, umap
The naming/classification is based on a combination conventional markers. We do not claim to know the exact identity of each cell, rather we refer to cells as ‘KIT+ Mast cells"-like cells. Likewise we refer to the cell clusters as ’communities’ of cells that exihibit similar properties, i.e. similar defining markers (e.g. KIT).
We will rename the cell types to human readable names.
### change names for clarity
# backup.scRNAseqData = scRNAseqData
# get the old names to change to new names
UMAPPlot(backup.scRNAseqData, label = FALSE, pt.size = 1.25, label.size = 4, group.by = "ident")
levels(unique(backup.scRNAseqData@active.ident))
[1] "CD3+CD8A+ T cells I" "CD3+CD8A+ T cells III" "CD3+CD4+ T Cells I" "CD14+CD68+ Macrophages I"
[5] "Mixed Cells I" "CD3+CD8A+ T Cells II" "CD14+CD68+ Macrophages II" "CD3+CD4+ T Cells II"
[9] "ACTA2+ Smooth Muscle Cells" "CD34+ Endothelial Cells I" "CD34+ Endothelial Cells II" "NCAM1+ Natural Killer Cells"
[13] "Mixed Cells II" "CD79A+ B Cells I" "CD14+CD68+ Macrophages III" "CD3+ Regulatory T Cells"
[17] "KIT+ Mast Cells" "CD79A+ B Cells II"
# "CD3+CD8A+ T cells I" "CD3+CD8A+ T cells III" "CD3+CD4+ T Cells I" "CD14+CD68+ Macrophages I"
# "Mixed Cells I" "CD3+CD8A+ T Cells II" "CD14+CD68+ Macrophages II" "CD3+CD4+ T Cells II"
# "ACTA2+ Smooth Muscle Cells" "CD34+ Endothelial Cells I" "CD34+ Endothelial Cells II" "NCAM1+ Natural Killer Cells"
# "Mixed Cells II" "CD79A+ B Cells I" "CD14+CD68+ Macrophages III" "CD3+ Regulatory T Cells"
# "KIT+ Mast Cells" "CD79A+ B Cells II"
celltypes <- c("CD14+CD68+ Macrophages I" = "CD14+CD68+ M I",
"CD14+CD68+ Macrophages II" = "CD14+CD68+ M II",
"CD14+CD68+ Macrophages III" = "CD14+CD68+ M III",
"CD3+CD8A+ T cells I" = "CD3+CD8A+ T I",
"CD3+CD8A+ T Cells II" = "CD3+CD8A+ T II ",
"CD3+CD8A+ T cells III" = "CD3+CD8A+ T III",
"CD3+CD4+ T Cells I" = "CD3+CD4+ T I",
"CD3+CD4+ T Cells II" = "CD3+CD4+ T II",
"CD3+ Regulatory T Cells" = "CD3+ Treg",
"CD34+ Endothelial Cells I" = "CD34+ EC I",
"CD34+ Endothelial Cells II" = "CD34+ EC II",
"Mixed Cells I" = "Mixed I",
"Mixed Cells II" = "Mixed II",
"ACTA2+ Smooth Muscle Cells" = "ACTA2+ SMC",
"NCAM1+ Natural Killer Cells" = "NCAM1+ NK",
"KIT+ Mast Cells" = "KIT+ MC",
"CD79A+ B Cells I" = "CD79A+ B I",
"CD79A+ B Cells II" = "CD79A+ B II")
scRNAseqData <- Seurat::RenameIdents(object = backup.scRNAseqData,
celltypes)
UMAPPlot(scRNAseqData, label = FALSE, pt.size = 1.25, label.size = 4, group.by = "ident")
UMAPPlot(scRNAseqData, label = TRUE, pt.size = 1.25, label.size = 4, group.by = "ident",
repel = TRUE)
Loading Athero-Express clinical data.
require(haven)
# AEDB <- haven::read_sav(paste0(AEDB_loc, "/2019-3NEW_AtheroExpressDatabase_ScientificAE_02072019_IC_added.sav"))
AEDB <- haven::read_sav(paste0(AEDB_loc, "/2020_1_NEW_AtheroExpressDatabase_ScientificAE_16-03-2020.sav"))
We need to be very strict in defining symptoms. Therefore we will fix a new variable that groups symptoms at inclusion.
Coding of symptoms is as follows:
We will group as follows:
# Fix symptoms
attach(AEDB)
AEDB[,"Symptoms.5G"] <- NA
AEDB$Symptoms.5G[sympt == 0] <- "Asymptomatic"
AEDB$Symptoms.5G[sympt == 1 | sympt == 7 | sympt == 13] <- "TIA"
AEDB$Symptoms.5G[sympt == 2 | sympt == 3] <- "Stroke"
AEDB$Symptoms.5G[sympt == 4 | sympt == 14 | sympt == 15 ] <- "Ocular"
AEDB$Symptoms.5G[sympt == 8 | sympt == 11] <- "Retinal infarction"
AEDB$Symptoms.5G[sympt == 5 | sympt == 9 | sympt == 10 | sympt == 12 | sympt == 16 | sympt == 17] <- "Other"
# AsymptSympt
AEDB[,"AsymptSympt"] <- NA
AEDB$AsymptSympt[sympt == -999] <- NA
AEDB$AsymptSympt[sympt == 0] <- "Asymptomatic"
AEDB$AsymptSympt[sympt == 1 | sympt == 7 | sympt == 13 | sympt == 2 | sympt == 3] <- "Symptomatic"
AEDB$AsymptSympt[sympt == 4 | sympt == 14 | sympt == 15 | sympt == 8 | sympt == 11 | sympt == 5 | sympt == 9 | sympt == 10 | sympt == 12 | sympt == 16 | sympt == 17] <- "Ocular and others"
# AsymptSympt
AEDB[,"AsymptSympt2G"] <- NA
AEDB$AsymptSympt2G[sympt == -999] <- NA
AEDB$AsymptSympt2G[sympt == 0] <- "Asymptomatic"
AEDB$AsymptSympt2G[sympt == 1 | sympt == 7 | sympt == 13 | sympt == 2 | sympt == 3 | sympt == 4 | sympt == 14 | sympt == 15 | sympt == 8 | sympt == 11 | sympt == 5 | sympt == 9 | sympt == 10 | sympt == 12 | sympt == 16 | sympt == 17] <- "Symptomatic"
detach(AEDB)
# table(AEDB$sympt, useNA = "ifany")
# table(AEDB$AsymptSympt2G, useNA = "ifany")
# table(AEDB$Symptoms.5G, useNA = "ifany")
#
# table(AEDB$AsymptSympt2G, AEDB$sympt, useNA = "ifany")
# table(AEDB$Symptoms.5G, AEDB$sympt, useNA = "ifany")
table(AEDB$AsymptSympt2G, AEDB$Symptoms.5G, useNA = "ifany")
Asymptomatic Ocular Other Retinal infarction Stroke TIA <NA>
Asymptomatic 333 0 0 0 0 0 0
Symptomatic 0 416 119 43 732 1045 0
<NA> 0 0 0 0 0 0 1103
# AEDB.temp <- subset(AEDB, select = c("STUDY_NUMBER", "UPID", "Age", "Gender", "Hospital", "Artery_summary", "sympt", "Symptoms.5G", "AsymptSympt"))
# require(labelled)
# AEDB.temp$Gender <- to_factor(AEDB.temp$Gender)
# AEDB.temp$Hospital <- to_factor(AEDB.temp$Hospital)
# AEDB.temp$Artery_summary <- to_factor(AEDB.temp$Artery_summary)
#
# DT::datatable(AEDB.temp[1:10,], caption = "Excerpt of the whole AEDB.", rownames = FALSE)
#
# table(AEDB.temp$Symptoms.5G, AEDB.temp$AsymptSympt)
#
# rm(AEDB.temp)
We will also fix the plaquephenotypes variable.
Coding of symptoms is as follows:
# Fix plaquephenotypes
attach(AEDB)
AEDB[,"OverallPlaquePhenotype"] <- NA
AEDB$OverallPlaquePhenotype[plaquephenotype == -999] <- NA
AEDB$OverallPlaquePhenotype[plaquephenotype == -999] <- NA
AEDB$OverallPlaquePhenotype[plaquephenotype == 1] <- "fibrous"
AEDB$OverallPlaquePhenotype[plaquephenotype == 2] <- "fibroatheromatous"
AEDB$OverallPlaquePhenotype[plaquephenotype == 3] <- "atheromatous"
detach(AEDB)
# AEDB.temp <- subset(AEDB, select = c("STUDY_NUMBER", "UPID", "Age", "Gender", "Hospital", "Artery_summary", "plaquephenotype", "OverallPlaquePhenotype"))
# require(labelled)
# AEDB.temp$Gender <- to_factor(AEDB.temp$Gender)
# AEDB.temp$Hospital <- to_factor(AEDB.temp$Hospital)
# AEDB.temp$Artery_summary <- to_factor(AEDB.temp$Artery_summary)
#
# DT::datatable(AEDB.temp[1:10,], caption = "Excerpt of the whole AEDB.", rownames = FALSE)
#
# rm(AEDB.temp)
We will also fix the diabetes status variable.
# Fix diabetes
attach(AEDB)
AEDB[,"DiabetesStatus"] <- NA
AEDB$DiabetesStatus[DM.composite == -999] <- NA
AEDB$DiabetesStatus[DM.composite == 0] <- "Control (no Diabetes Dx/Med)"
AEDB$DiabetesStatus[DM.composite == 1] <- "Diabetes"
detach(AEDB)
table(AEDB$DM.composite, AEDB$DiabetesStatus)
Control (no Diabetes Dx/Med) Diabetes
0 2764 0
1 0 985
# AEDB.temp <- subset(AEDB, select = c("STUDY_NUMBER", "UPID", "Age", "Gender", "Hospital", "Artery_summary", "DM.composite", "DiabetesStatus"))
# require(labelled)
# AEDB.temp$Gender <- to_factor(AEDB.temp$Gender)
# AEDB.temp$Hospital <- to_factor(AEDB.temp$Hospital)
# AEDB.temp$Artery_summary <- to_factor(AEDB.temp$Artery_summary)
# AEDB.temp$DiabetesStatus <- to_factor(AEDB.temp$DiabetesStatus)
#
# DT::datatable(AEDB.temp[1:10,], caption = "Excerpt of the whole AEDB.", rownames = FALSE)
#
# rm(AEDB.temp)
We will also fix the smoking status variable. We are interested in whether someone never, ever or is currently (at the time of inclusion) smoking. This is based on the questionnaire.
diet801: are you a smoker?diet802: did you smoke in the past?We already have some variables indicating smoking status:
SmokingReported: patient has reported to smoke.SmokingYearOR: smoking in the year of surgery?SmokerCurrent: currently smoking?require(labelled)
Loading required package: labelled
AEDB$diet801 <- to_factor(AEDB$diet801)
AEDB$diet802 <- to_factor(AEDB$diet802)
AEDB$diet805 <- to_factor(AEDB$diet805)
AEDB$SmokingReported <- to_factor(AEDB$SmokingReported)
AEDB$SmokerCurrent <- to_factor(AEDB$SmokerCurrent)
AEDB$SmokingYearOR <- to_factor(AEDB$SmokingYearOR)
# table(AEDB$diet801)
# table(AEDB$diet802)
# table(AEDB$SmokingReported)
# table(AEDB$SmokerCurrent)
# table(AEDB$SmokingYearOR)
# table(AEDB$SmokingReported, AEDB$SmokerCurrent, useNA = "ifany", dnn = c("Reported smoking", "Current smoker"))
#
# table(AEDB$diet801, AEDB$diet802, useNA = "ifany", dnn = c("Smoker", "Past smoker"))
cat("\nFixing smoking status.\n")
Fixing smoking status.
attach(AEDB)
AEDB[,"SmokerStatus"] <- NA
AEDB$SmokerStatus[diet802 == "don't know"] <- "Never smoked"
AEDB$SmokerStatus[diet802 == "I still smoke"] <- "Current smoker"
AEDB$SmokerStatus[SmokerCurrent == "no" & diet802 == "no"] <- "Never smoked"
AEDB$SmokerStatus[SmokerCurrent == "no" & diet802 == "yes"] <- "Ex-smoker"
AEDB$SmokerStatus[SmokerCurrent == "yes"] <- "Current smoker"
AEDB$SmokerStatus[SmokerCurrent == "no data available/missing"] <- NA
# AEDB$SmokerStatus[is.na(SmokerCurrent)] <- "Never smoked"
detach(AEDB)
cat("\n* Current smoking status.\n")
* Current smoking status.
table(AEDB$SmokerCurrent,
useNA = "ifany",
dnn = c("Current smoker"))
Current smoker
no data available/missing no yes <NA>
0 2364 1308 119
cat("\n* Updated smoking status.\n")
* Updated smoking status.
table(AEDB$SmokerStatus,
useNA = "ifany",
dnn = c("Updated smoking status"))
Updated smoking status
Current smoker Ex-smoker Never smoked <NA>
1308 1814 389 280
cat("\n* Comparing to 'SmokerCurrent'.\n")
* Comparing to 'SmokerCurrent'.
table(AEDB$SmokerStatus, AEDB$SmokerCurrent,
useNA = "ifany",
dnn = c("Updated smoking status", "Current smoker"))
Current smoker
Updated smoking status no data available/missing no yes <NA>
Current smoker 0 0 1308 0
Ex-smoker 0 1814 0 0
Never smoked 0 389 0 0
<NA> 0 161 0 119
# AEDB.temp <- subset(AEDB, select = c("STUDY_NUMBER", "UPID", "Age", "Gender", "Hospital", "Artery_summary", "DM.composite", "DiabetesStatus"))
# require(labelled)
# AEDB.temp$Gender <- to_factor(AEDB.temp$Gender)
# AEDB.temp$Hospital <- to_factor(AEDB.temp$Hospital)
# AEDB.temp$Artery_summary <- to_factor(AEDB.temp$Artery_summary)
# AEDB.temp$DiabetesStatus <- to_factor(AEDB.temp$DiabetesStatus)
#
# DT::datatable(AEDB.temp[1:10,], caption = "Excerpt of the whole AEDB.", rownames = FALSE)
#
# rm(AEDB.temp)
We will also fix the alcohol status variable.
# Fix diabetes
attach(AEDB)
AEDB[,"AlcoholUse"] <- NA
AEDB$AlcoholUse[diet810 == -999] <- NA
AEDB$AlcoholUse[diet810 == 0] <- "No"
AEDB$AlcoholUse[diet810 == 1] <- "Yes"
detach(AEDB)
# AEDB.temp <- subset(AEDB, select = c("STUDY_NUMBER", "UPID", "Age", "Gender", "Hospital", "Artery_summary", "diet810", "AlcoholUse"))
# require(labelled)
# AEDB.temp$Gender <- to_factor(AEDB.temp$Gender)
# AEDB.temp$Hospital <- to_factor(AEDB.temp$Hospital)
# AEDB.temp$Artery_summary <- to_factor(AEDB.temp$Artery_summary)
# AEDB.temp$AlcoholUse <- to_factor(AEDB.temp$AlcoholUse)
#
# DT::datatable(AEDB.temp[1:10,], caption = "Excerpt of the whole AEDB.", rownames = FALSE)
#
# rm(AEDB.temp)
We are interested in the following variables at baseline.
cat("====================================================================================================\n")
====================================================================================================
cat("SELECTION THE SHIZZLE\n")
SELECTION THE SHIZZLE
### Artery levels
# AEdata$Artery_summary:
# value label
# NOT USE - 0 No artery known (yet), no surgery (patient ill, died, exited study), re-numbered to AAA
# USE - 1 carotid (left & right)
# USE - 2 femoral/iliac (left, right or both sides)
# NOT USE - 3 other carotid arteries (common, external)
# NOT USE - 4 carotid bypass and injury (left, right or both sides)
# NOT USE - 5 aneurysmata (carotid & femoral)
# NOT USE - 6 aorta
# NOT USE - 7 other arteries (renal, popliteal, vertebral)
# NOT USE - 8 femoral bypass, angioseal and injury (left, right or both sides)
### AEdata$informedconsent
# value label
# NOT USE - -999 missing
# NOT USE - 0 no, died
# USE - 1 yes
# USE - 2 yes, health treatment when possible
# USE - 3 yes, no health treatment
# USE - 4 yes, no health treatment, no commercial business
# NOT USE - 5 yes, no tissue, no commerical business
# NOT USE - 6 yes, no tissue, no questionnaires, no medical info, no commercial business
# USE - 7 yes, no questionnaires, no health treatment, no commercial business
# USE - 8 yes, no questionnaires, health treatment when possible
# NOT USE - 9 yes, no tissue, no questionnaires, no health treatment, no commerical business
# USE - 10 yes, no health treatment, no medical info, no commercial business
# NOT USE - 11 yes, no tissue, no questionnaires, no health treatment, no medical info, no commercial business
# USE - 12 yes, no questionnaires, no health treatment
# NOT USE - 13 yes, no tissue, no health treatment
# NOT USE - 14 yes, no tissue, no questionnaires
# NOT USE - 15 yes, no tissue, health treatment when possible
# NOT USE - 16 yes, no tissue
# USE - 17 yes, no commerical business
# USE - 18 yes, health treatment when possible, no commercial business
# USE - 19 yes, no medical info, no commercial business
# USE - 20 yes, no questionnaires
# NOT USE - 21 yes, no tissue, no questionnaires, no health treatment, no medical info
# NOT USE - 22 yes, no tissue, no questionnaires, no health treatment, no commercial business
# USE - 23 yes, no medical info
# USE - 24 yes, no questionnaires, no commercial business
# USE - 25 yes, no questionnaires, no health treatment, no medical info
# USE - 26 yes, no questionnaires, health treatment when possible, no commercial business
# USE - 27 yes, no health treatment, no medical info
# NOT USE - 28 no, doesn't want to
# NOT USE - 29 no, unable to sign
# NOT USE - 30 no, no reaction
# NOT USE - 31 no, lost
# NOT USE - 32 no, too old
# NOT USE - 34 yes, no medical info, health treatment when possible
# NOT USE - 35 no (never asked for IC because there was no tissue)
# USE - 36 yes, no medical info, no commercial business, health treatment when possible
# NOT USE - 37 no, endpoint
# USE - 38 wil niets invullen, wel alles gebruiken
# USE - 39 second informed concents: yes, no commercial business
# NOT USE - 40 nooit geincludeerd
cat("- sanity checking PRIOR to selection")
- sanity checking PRIOR to selection
library(data.table)
require(labelled)
ae.gender <- to_factor(AEDB$Gender)
ae.hospital <- to_factor(AEDB$Hospital)
table(ae.gender, ae.hospital, dnn = c("Sex", "Hospital"))
Hospital
Sex St. Antonius, Nieuwegein UMC Utrecht
female 524 636
male 1211 1420
ae.artery <- to_factor(AEDB$Artery_summary)
table(ae.artery, ae.gender, dnn = c("Sex", "Artery"))
Artery
Sex female male
No artery known (yet), no surgery (patient ill, died, exited study), re-numbered to AAA 0 0
carotid (left & right) 805 1781
femoral/iliac (left, right or both sides) 320 796
other carotid arteries (common, external) 17 35
carotid bypass and injury (left, right or both sides) 6 3
aneurysmata (carotid & femoral) 1 0
aorta 3 5
other arteries (renal, popliteal, vertebral) 4 9
femoral bypass, angioseal and injury (left, right or both sides) 4 2
rm(ae.gender, ae.hospital, ae.artery)
# I change numeric and factors manually because, well, I wouldn't know how to fix it otherwise
# to have this 'tibble' work with 'tableone'... :-)
AEDB$Age <- as.numeric(AEDB$Age)
AEDB$diastoli <- as.numeric(AEDB$diastoli)
AEDB$systolic <- as.numeric(AEDB$systolic)
AEDB$TC_finalCU <- as.numeric(AEDB$TC_finalCU)
AEDB$LDL_finalCU <- as.numeric(AEDB$LDL_finalCU)
AEDB$HDL_finalCU <- as.numeric(AEDB$HDL_finalCU)
AEDB$TG_finalCU <- as.numeric(AEDB$TG_finalCU)
AEDB$TC_final <- as.numeric(AEDB$TC_final)
AEDB$LDL_final <- as.numeric(AEDB$LDL_final)
AEDB$HDL_final <- as.numeric(AEDB$HDL_final)
AEDB$TG_final <- as.numeric(AEDB$TG_final)
AEDB$Age <- as.numeric(AEDB$Age)
AEDB$GFR_MDRD <- as.numeric(AEDB$GFR_MDRD)
AEDB$BMI <- as.numeric(AEDB$BMI)
AEDB$eCigarettes <- as.numeric(AEDB$eCigarettes)
AEDB$ePackYearsSmoking <- as.numeric(AEDB$ePackYearsSmoking)
AEDB$EP_composite_time <- as.numeric(AEDB$EP_composite_time)
AEDB$macmean0 <- as.numeric(AEDB$macmean0)
AEDB$smcmean0 <- as.numeric(AEDB$smcmean0)
AEDB$neutrophils <- as.numeric(AEDB$neutrophils)
AEDB$Mast_cells_plaque <- as.numeric(AEDB$Mast_cells_plaque)
AEDB$vessel_density_averaged <- as.numeric(AEDB$vessel_density_averaged)
require(labelled)
AEDB$ORyear <- to_factor(AEDB$ORyear)
AEDB$Gender <- to_factor(AEDB$Gender)
AEDB$Hospital <- to_factor(AEDB$Hospital)
AEDB$KDOQI <- to_factor(AEDB$KDOQI)
AEDB$BMI_WHO <- to_factor(AEDB$BMI_WHO)
AEDB$DiabetesStatus <- to_factor(AEDB$DiabetesStatus)
AEDB$SmokerStatus <- to_factor(AEDB$SmokerStatus)
AEDB$AlcoholUse <- to_factor(AEDB$AlcoholUse)
AEDB$Hypertension.selfreport <- to_factor(AEDB$Hypertension1)
AEDB$Hypertension.selfreportdrug <- to_factor(AEDB$Hypertension2)
AEDB$Hypertension.composite <- to_factor(AEDB$Hypertension.composite)
AEDB$Hypertension.drugs <- to_factor(AEDB$Hypertension.drugs)
AEDB$Med.anticoagulants <- to_factor(AEDB$Med.anticoagulants)
AEDB$Med.all.antiplatelet <- to_factor(AEDB$Med.all.antiplatelet)
AEDB$Med.Statin.LLD <- to_factor(AEDB$Med.Statin.LLD)
AEDB$Stroke_Dx <- to_factor(AEDB$Stroke_Dx)
AEDB$CAD_history <- to_factor(AEDB$CAD_history)
AEDB$PAOD <- to_factor(AEDB$PAOD)
AEDB$Peripheral.interv <- to_factor(AEDB$Peripheral.interv)
AEDB$sympt <- to_factor(AEDB$sympt)
AEDB$Symptoms.3g <- to_factor(AEDB$Symptoms.3g)
AEDB$Symptoms.4g <- to_factor(AEDB$Symptoms.4g)
AEDB$Symptoms.5G <- to_factor(AEDB$Symptoms.5G)
AEDB$AsymptSympt <- to_factor(AEDB$AsymptSympt)
AEDB$AsymptSympt2G <- to_factor(AEDB$AsymptSympt2G)
AEDB$restenos <- to_factor(AEDB$restenos)
AEDB$stenose <- to_factor(AEDB$stenose)
AEDB$EP_composite <- to_factor(AEDB$EP_composite)
AEDB$Macrophages.bin <- to_factor(AEDB$Macrophages.bin)
AEDB$SMC.bin <- to_factor(AEDB$SMC.bin)
AEDB$IPH.bin <- to_factor(AEDB$IPH.bin)
AEDB$Calc.bin <- to_factor(AEDB$Calc.bin)
AEDB$Collagen.bin <- to_factor(AEDB$Collagen.bin)
AEDB$Fat.bin_10 <- to_factor(AEDB$Fat.bin_10)
AEDB$Fat.bin_40 <- to_factor(AEDB$Fat.bin_40)
AEDB$OverallPlaquePhenotype <- to_factor(AEDB$OverallPlaquePhenotype)
AEDB$Artery_summary <- to_factor(AEDB$Artery_summary)
AEDB$informedconsent <- to_factor(AEDB$informedconsent)
AEDB.CEA <- subset(AEDB,
(Artery_summary == "carotid (left & right)" | Artery_summary == "other carotid arteries (common, external)") & # we only want carotids
informedconsent != "missing" & # we are really strict in selecting based on 'informed consent'!
informedconsent != "no, died" &
informedconsent != "yes, no tissue, no commerical business" &
informedconsent != "yes, no tissue, no questionnaires, no medical info, no commercial business" &
informedconsent != "yes, no tissue, no questionnaires, no health treatment, no commerical business" &
informedconsent != "yes, no tissue, no questionnaires, no health treatment, no medical info, no commercial business" &
informedconsent != "yes, no tissue, no health treatment" &
informedconsent != "yes, no tissue, no questionnaires" &
informedconsent != "yes, no tissue, health treatment when possible" &
informedconsent != "yes, no tissue" &
informedconsent != "yes, no tissue, no questionnaires, no health treatment, no medical info" &
informedconsent != "yes, no tissue, no questionnaires, no health treatment, no commercial business" &
informedconsent != "no, doesn't want to" &
informedconsent != "no, unable to sign" &
informedconsent != "no, no reaction" &
informedconsent != "no, lost" &
informedconsent != "no, too old" &
informedconsent != "yes, no medical info, health treatment when possible" &
informedconsent != "no (never asked for IC because there was no tissue)" &
informedconsent != "no, endpoint" &
informedconsent != "nooit geincludeerd" &
!is.na(AsymptSympt2G))
# AEDB.CEA[1:10, 1:10]
dim(AEDB.CEA)
[1] 2421 1100
cat("===========================================================================================\n")
===========================================================================================
cat("CREATE BASELINE TABLE\n")
CREATE BASELINE TABLE
# Baseline table variables
basetable_vars = c("Hospital", "ORyear",
"Age", "Gender",
"TC_finalCU", "LDL_finalCU", "HDL_finalCU", "TG_finalCU",
"TC_final", "LDL_final", "HDL_final", "TG_final",
"systolic", "diastoli", "GFR_MDRD", "BMI",
"KDOQI", "BMI_WHO",
"SmokerStatus", "AlcoholUse",
"DiabetesStatus",
"Hypertension.selfreport", "Hypertension.selfreportdrug", "Hypertension.composite", "Hypertension.drugs",
"Med.anticoagulants", "Med.all.antiplatelet", "Med.Statin.LLD",
"Stroke_Dx", "sympt", "Symptoms.5G", "AsymptSympt", "AsymptSympt2G",
"restenos", "stenose",
"CAD_history", "PAOD", "Peripheral.interv",
"EP_composite", "EP_composite_time",
"macmean0", "smcmean0", "Macrophages.bin", "SMC.bin",
"neutrophils", "Mast_cells_plaque",
"IPH.bin", "vessel_density_averaged",
"Calc.bin", "Collagen.bin",
"Fat.bin_10", "Fat.bin_40", "OverallPlaquePhenotype")
basetable_bin = c("Gender",
"KDOQI", "BMI_WHO",
"SmokerStatus", "AlcoholUse",
"DiabetesStatus",
"Hypertension.selfreport", "Hypertension.selfreportdrug", "Hypertension.composite", "Hypertension.drugs",
"Med.anticoagulants", "Med.all.antiplatelet", "Med.Statin.LLD",
"Stroke_Dx", "sympt", "Symptoms.5G", "AsymptSympt", "AsymptSympt2G",
"restenos", "stenose",
"CAD_history", "PAOD", "Peripheral.interv",
"EP_composite", "Macrophages.bin", "SMC.bin",
"IPH.bin",
"Calc.bin", "Collagen.bin",
"Fat.bin_10", "Fat.bin_40", "OverallPlaquePhenotype")
# basetable_bin
basetable_con = basetable_vars[!basetable_vars %in% basetable_bin]
# basetable_con
Showing the baseline table of the whole Athero-Express Biobank.
# Create baseline tables
# http://rstudio-pubs-static.s3.amazonaws.com/13321_da314633db924dc78986a850813a50d5.html
AEDB.CEA.tableOne = print(CreateTableOne(vars = basetable_vars,
# factorVars = basetable_bin,
# strata = "Gender",
data = AEDB.CEA, includeNA = TRUE),
nonnormal = c(), missing = TRUE,
quote = FALSE, noSpaces = FALSE, showAllLevels = TRUE, explain = TRUE,
format = "pf",
contDigits = 3)[,1:3]
level Overall
n 2421
Hospital % (freq) St. Antonius, Nieuwegein 39.2 ( 948)
UMC Utrecht 60.8 (1473)
ORyear % (freq) No data available/missing 0.0 ( 0)
2002 3.3 ( 81)
2003 6.5 ( 157)
2004 7.8 ( 190)
2005 7.6 ( 185)
2006 7.6 ( 183)
2007 6.3 ( 152)
2008 5.7 ( 138)
2009 7.5 ( 181)
2010 6.6 ( 159)
2011 6.7 ( 163)
2012 7.3 ( 176)
2013 6.2 ( 149)
2014 6.7 ( 163)
2015 3.1 ( 76)
2016 3.5 ( 85)
2017 2.7 ( 65)
2018 2.7 ( 66)
2019 2.1 ( 52)
Age (mean (SD)) 69.105 (9.302)
Gender % (freq) female 30.5 ( 738)
male 69.5 (1683)
TC_finalCU (mean (SD)) 184.803 (56.262)
LDL_finalCU (mean (SD)) 108.420 (41.744)
HDL_finalCU (mean (SD)) 46.435 (17.005)
TG_finalCU (mean (SD)) 151.216 (91.277)
TC_final (mean (SD)) 4.786 (1.457)
LDL_final (mean (SD)) 2.808 (1.081)
HDL_final (mean (SD)) 1.203 (0.440)
TG_final (mean (SD)) 1.709 (1.031)
systolic (mean (SD)) 152.419 (25.166)
diastoli (mean (SD)) 81.318 (25.188)
GFR_MDRD (mean (SD)) 73.121 (21.152)
BMI (mean (SD)) 26.488 (3.977)
KDOQI % (freq) No data available/missing 0.0 ( 0)
Normal kidney function 19.1 ( 462)
CKD 2 (Mild) 50.9 (1232)
CKD 3 (Moderate) 22.8 ( 553)
CKD 4 (Severe) 1.3 ( 32)
CKD 5 (Failure) 0.4 ( 10)
<NA> 5.5 ( 132)
BMI_WHO % (freq) No data available/missing 0.0 ( 0)
Underweight 1.0 ( 24)
Normal 35.1 ( 850)
Overweight 43.4 (1051)
Obese 14.5 ( 352)
<NA> 5.9 ( 144)
SmokerStatus % (freq) Current smoker 33.2 ( 803)
Ex-smoker 48.0 (1163)
Never smoked 12.9 ( 313)
<NA> 5.9 ( 142)
AlcoholUse % (freq) No 34.5 ( 835)
Yes 61.5 (1488)
<NA> 4.0 ( 98)
DiabetesStatus % (freq) Control (no Diabetes Dx/Med) 75.2 (1820)
Diabetes 23.7 ( 574)
<NA> 1.1 ( 27)
Hypertension.selfreport % (freq) No data available/missing 0.0 ( 0)
no 24.3 ( 589)
yes 72.4 (1754)
<NA> 3.2 ( 78)
Hypertension.selfreportdrug % (freq) No data available/missing 0.0 ( 0)
no 29.9 ( 725)
yes 65.6 (1589)
<NA> 4.4 ( 107)
Hypertension.composite % (freq) No data available/missing 0.0 ( 0)
no 14.6 ( 353)
yes 84.3 (2040)
<NA> 1.2 ( 28)
Hypertension.drugs % (freq) No data available/missing 0.0 ( 0)
no 23.3 ( 565)
yes 75.3 (1823)
<NA> 1.4 ( 33)
Med.anticoagulants % (freq) No data available/missing 0.0 ( 0)
no 87.3 (2114)
yes 11.1 ( 269)
<NA> 1.6 ( 38)
Med.all.antiplatelet % (freq) No data available/missing 0.0 ( 0)
no 12.2 ( 295)
yes 86.3 (2090)
<NA> 1.5 ( 36)
Med.Statin.LLD % (freq) No data available/missing 0.0 ( 0)
no 20.3 ( 491)
yes 78.3 (1896)
<NA> 1.4 ( 34)
Stroke_Dx % (freq) Missing 0.0 ( 0)
No stroke diagnosed 71.5 (1731)
Stroke diagnosed 21.6 ( 524)
<NA> 6.9 ( 166)
sympt % (freq) missing 0.0 ( 0)
Asymptomatic 11.2 ( 270)
TIA 39.7 ( 961)
minor stroke 16.8 ( 407)
Major stroke 9.8 ( 238)
Amaurosis fugax 15.7 ( 379)
Four vessel disease 1.6 ( 38)
Vertebrobasilary TIA 0.2 ( 5)
Retinal infarction 1.4 ( 34)
Symptomatic, but aspecific symtoms 2.2 ( 53)
Contralateral symptomatic occlusion 0.5 ( 11)
retinal infarction 0.2 ( 6)
armclaudication due to occlusion subclavian artery, CEA needed for bypass 0.0 ( 1)
retinal infarction + TIAs 0.0 ( 0)
Ocular ischemic syndrome 0.7 ( 16)
ischemisch glaucoom 0.0 ( 0)
subclavian steal syndrome 0.1 ( 2)
TGA 0.0 ( 0)
Symptoms.5G % (freq) Asymptomatic 11.2 ( 270)
Ocular 16.3 ( 395)
Other 4.3 ( 105)
Retinal infarction 1.7 ( 40)
Stroke 26.6 ( 645)
TIA 39.9 ( 966)
AsymptSympt % (freq) Asymptomatic 11.2 ( 270)
Ocular and others 22.3 ( 540)
Symptomatic 66.5 (1611)
AsymptSympt2G % (freq) Asymptomatic 11.2 ( 270)
Symptomatic 88.8 (2151)
restenos % (freq) missing 0.0 ( 0)
de novo 93.7 (2268)
restenosis 4.9 ( 118)
stenose bij angioseal na PTCA 0.0 ( 0)
<NA> 1.4 ( 35)
stenose % (freq) missing 0.0 ( 0)
0-49% 0.5 ( 13)
50-70% 7.8 ( 189)
70-90% 46.6 (1127)
90-99% 38.3 ( 927)
100% (Occlusion) 1.3 ( 31)
NA 0.0 ( 1)
50-99% 0.6 ( 15)
70-99% 2.8 ( 68)
99 0.1 ( 2)
<NA> 2.0 ( 48)
CAD_history % (freq) Missing 0.0 ( 0)
No history CAD 66.8 (1618)
History CAD 31.2 ( 756)
<NA> 1.9 ( 47)
PAOD % (freq) missing/no data 0.0 ( 0)
no 77.5 (1876)
yes 20.5 ( 497)
<NA> 2.0 ( 48)
Peripheral.interv % (freq) no 77.2 (1868)
yes 19.9 ( 482)
<NA> 2.9 ( 71)
EP_composite % (freq) No data available. 0.0 ( 0)
No composite endpoints 70.6 (1709)
Composite endpoints 24.4 ( 590)
<NA> 5.0 ( 122)
EP_composite_time (mean (SD)) 2.479 (1.109)
macmean0 (mean (SD)) 0.768 (1.184)
smcmean0 (mean (SD)) 1.985 (2.381)
Macrophages.bin % (freq) no/minor 34.9 ( 846)
moderate/heavy 40.9 ( 991)
<NA> 24.1 ( 584)
SMC.bin % (freq) no/minor 24.9 ( 602)
moderate/heavy 51.3 (1242)
<NA> 23.8 ( 577)
neutrophils (mean (SD)) 147.151 (419.998)
Mast_cells_plaque (mean (SD)) 164.488 (163.771)
IPH.bin % (freq) no 30.7 ( 744)
yes 45.8 (1108)
<NA> 23.5 ( 569)
vessel_density_averaged (mean (SD)) 8.318 (6.388)
Calc.bin % (freq) no/minor 41.6 (1006)
moderate/heavy 35.1 ( 849)
<NA> 23.4 ( 566)
Collagen.bin % (freq) no/minor 15.8 ( 382)
moderate/heavy 60.6 (1467)
<NA> 23.6 ( 572)
Fat.bin_10 % (freq) <10% 22.4 ( 542)
>10% 54.3 (1314)
<NA> 23.3 ( 565)
Fat.bin_40 % (freq) <40% 56.2 (1360)
>40% 20.5 ( 496)
<NA> 23.3 ( 565)
OverallPlaquePhenotype % (freq) atheromatous 19.8 ( 480)
fibroatheromatous 27.8 ( 672)
fibrous 28.7 ( 695)
<NA> 23.7 ( 574)
Missing
n
Hospital % (freq) 0.0
ORyear % (freq) 0.0
Age (mean (SD)) 0.0
Gender % (freq) 0.0
TC_finalCU (mean (SD)) 38.0
LDL_finalCU (mean (SD)) 45.6
HDL_finalCU (mean (SD)) 41.7
TG_finalCU (mean (SD)) 42.8
TC_final (mean (SD)) 38.0
LDL_final (mean (SD)) 45.6
HDL_final (mean (SD)) 41.7
TG_final (mean (SD)) 42.8
systolic (mean (SD)) 11.3
diastoli (mean (SD)) 11.3
GFR_MDRD (mean (SD)) 5.4
BMI (mean (SD)) 5.9
KDOQI % (freq) 5.5
BMI_WHO % (freq) 5.9
SmokerStatus % (freq) 5.9
AlcoholUse % (freq) 4.0
DiabetesStatus % (freq) 1.1
Hypertension.selfreport % (freq) 3.2
Hypertension.selfreportdrug % (freq) 4.4
Hypertension.composite % (freq) 1.2
Hypertension.drugs % (freq) 1.4
Med.anticoagulants % (freq) 1.6
Med.all.antiplatelet % (freq) 1.5
Med.Statin.LLD % (freq) 1.4
Stroke_Dx % (freq) 6.9
sympt % (freq) 0.0
Symptoms.5G % (freq) 0.0
AsymptSympt % (freq) 0.0
AsymptSympt2G % (freq) 0.0
restenos % (freq) 1.4
stenose % (freq) 2.0
CAD_history % (freq) 1.9
PAOD % (freq) 2.0
Peripheral.interv % (freq) 2.9
EP_composite % (freq) 5.0
EP_composite_time (mean (SD)) 5.2
macmean0 (mean (SD)) 29.7
smcmean0 (mean (SD)) 29.9
Macrophages.bin % (freq) 24.1
SMC.bin % (freq) 23.8
neutrophils (mean (SD)) 87.4
Mast_cells_plaque (mean (SD)) 90.0
IPH.bin % (freq) 23.5
vessel_density_averaged (mean (SD)) 35.1
Calc.bin % (freq) 23.4
Collagen.bin % (freq) 23.6
Fat.bin_10 % (freq) 23.3
Fat.bin_40 % (freq) 23.3
OverallPlaquePhenotype % (freq) 23.7
metadata <- scRNAseqData@meta.data %>% as_tibble() %>% separate(orig.ident, c("Patient", NA))
scRNAseqDataMeta <- metadata %>% distinct(Patient, .keep_all = TRUE)
distinct: removed 6,153 rows (99%), 38 rows remaining
scRNAseqDataMetaAE <- merge(scRNAseqDataMeta, AEDB, by.x = "Patient", by.y = "STUDY_NUMBER", sort = FALSE, all.x = TRUE)
dim(scRNAseqDataMetaAE)
[1] 38 1112
# Replace missing data
# Ref: https://cran.r-project.org/web/packages/naniar/vignettes/replace-with-na.html
require(naniar)
na_strings <- c("NA", "N A", "N / A", "N/A", "N/ A",
"Not Available", "Not available",
"missing",
"-999", "-99",
"No data available/missing", "No data available/Missing")
# Then you write ~.x %in% na_strings - which reads as “does this value occur in the list of NA strings”.
scRNAseqDataMetaAE %>%
replace_with_na_all(condition = ~.x %in% na_strings)
cat("====================================================================================================")
====================================================================================================
cat("SELECTION THE SHIZZLE")
SELECTION THE SHIZZLE
cat("- sanity checking PRIOR to selection")
- sanity checking PRIOR to selection
library(data.table)
require(labelled)
ae.gender <- to_factor(scRNAseqDataMetaAE$Gender)
ae.hospital <- to_factor(scRNAseqDataMetaAE$Hospital)
table(ae.gender, ae.hospital, dnn = c("Sex", "Hospital"), useNA = "ifany")
Hospital
Sex St. Antonius, Nieuwegein UMC Utrecht <NA>
female 0 10 0
male 0 26 0
<NA> 0 0 2
ae.artery <- to_factor(scRNAseqDataMetaAE$Artery_summary)
table(ae.artery, ae.gender, dnn = c("Sex", "Artery"), useNA = "ifany")
Artery
Sex female male <NA>
No artery known (yet), no surgery (patient ill, died, exited study), re-numbered to AAA 0 0 0
carotid (left & right) 10 25 0
femoral/iliac (left, right or both sides) 0 0 0
other carotid arteries (common, external) 0 1 0
carotid bypass and injury (left, right or both sides) 0 0 0
aneurysmata (carotid & femoral) 0 0 0
aorta 0 0 0
other arteries (renal, popliteal, vertebral) 0 0 0
femoral bypass, angioseal and injury (left, right or both sides) 0 0 0
<NA> 0 0 2
ae.ic <- to_factor(scRNAseqDataMetaAE$informedconsent)
table(ae.ic, ae.gender, useNA = "ifany")
ae.gender
ae.ic female male <NA>
missing 0 0 0
no, died 0 0 0
yes 5 14 0
yes, health treatment when possible 2 7 0
yes, no health treatment 1 2 0
yes, no health treatment, no commercial business 1 2 0
yes, no tissue, no commerical business 0 0 0
yes, no tissue, no questionnaires, no medical info, no commercial business 0 0 0
yes, no questionnaires, no health treatment, no commercial business 0 0 0
yes, no questionnaires, health treatment when possible 0 0 0
yes, no tissue, no questionnaires, no health treatment, no commerical business 0 0 0
yes, no health treatment, no medical info, no commercial business 0 0 0
yes, no tissue, no questionnaires, no health treatment, no medical info, no commercial business 0 0 0
yes, no questionnaires, no health treatment 0 0 0
yes, no tissue, no health treatment 0 0 0
yes, no tissue, no questionnaires 0 0 0
yes, no tissue, health treatment when possible 0 0 0
yes, no tissue 0 0 0
yes, no commerical business 0 1 0
yes, health treatment when possible, no commercial business 0 0 0
yes, no medical info, no commercial business 0 0 0
yes, no questionnaires 0 0 0
yes, no tissue, no questionnaires, no health treatment, no medical info 0 0 0
yes, no tissue, no questionnaires, no health treatment, no commercial business 0 0 0
yes, no medical info 0 0 0
yes, no questionnaires, no commercial business 0 0 0
yes, no questionnaires, no health treatment, no medical info 0 0 0
yes, no questionnaires, health treatment when possible, no commercial business 0 0 0
yes, no health treatment, no medical info 0 0 0
no, doesn't want to 0 0 0
no, unable to sign 0 0 0
no, no reaction 0 0 0
no, lost 0 0 0
no, too old 0 0 0
yes, no medical info, health treatment when possible 1 0 0
no (never asked for IC because there was no tissue) 0 0 0
yes, no medical info, no commercial business, health treatment when possible 0 0 0
no, endpoint 0 0 0
wil niets invullen, wel alles gebruiken 0 0 0
second informed concents: yes, no commercial business 0 0 0
nooit geincludeerd 0 0 0
<NA> 0 0 2
rm(ae.gender, ae.hospital, ae.artery, ae.ic)
scRNAseqDataMetaAE.all <- subset(scRNAseqDataMetaAE,
(Artery_summary == "carotid (left & right)" | Artery_summary == "other carotid arteries (common, external)" ) & # we only want carotids
informedconsent != "missing" & # we are really strict in selecting based on 'informed consent'!
informedconsent != "no, died" &
informedconsent != "yes, no tissue, no commerical business" &
informedconsent != "yes, no tissue, no questionnaires, no medical info, no commercial business" &
informedconsent != "yes, no tissue, no questionnaires, no health treatment, no commerical business" &
informedconsent != "yes, no tissue, no questionnaires, no health treatment, no medical info, no commercial business" &
informedconsent != "yes, no tissue, no health treatment" &
informedconsent != "yes, no tissue, no questionnaires" &
informedconsent != "yes, no tissue, health treatment when possible" &
informedconsent != "yes, no tissue" &
informedconsent != "yes, no tissue, no questionnaires, no health treatment, no medical info" &
informedconsent != "yes, no tissue, no questionnaires, no health treatment, no commercial business" &
informedconsent != "no, doesn't want to" &
informedconsent != "no, unable to sign" &
informedconsent != "no, no reaction" &
informedconsent != "no, lost" &
informedconsent != "no, too old" &
informedconsent != "yes, no medical info, health treatment when possible" &
informedconsent != "no (never asked for IC because there was no tissue)" &
informedconsent != "no, endpoint" &
informedconsent != "nooit geincludeerd")
# scRNAseqDataMetaAE.all[1:10, 1:10]
dim(scRNAseqDataMetaAE.all)
[1] 35 1112
# DT::datatable(scRNAseqDataMetaAE.all)
Showing the baseline table.
cat("===========================================================================================")
===========================================================================================
cat("CREATE BASELINE TABLE")
CREATE BASELINE TABLE
# Create baseline tables
# http://rstudio-pubs-static.s3.amazonaws.com/13321_da314633db924dc78986a850813a50d5.html
scRNAseqDataMetaAE.all.tableOne = print(CreateTableOne(vars = basetable_vars,
# factorVars = basetable_bin,
# strata = "Gender",
data = scRNAseqDataMetaAE.all, includeNA = TRUE),
nonnormal = c(),
quote = FALSE, showAllLevels = TRUE,
format = "p",
contDigits = 3)[,1:2]
Warning in ModuleReturnVarsExist(vars, data) :
These variables only have NA/NaN: macmean0 smcmean0 Macrophages.bin SMC.bin neutrophils Mast_cells_plaque IPH.bin vessel_density_averaged Calc.bin Collagen.bin Fat.bin_10 Fat.bin_40 OverallPlaquePhenotype Dropped
level Overall
n 35
Hospital (%) St. Antonius, Nieuwegein 0.0
UMC Utrecht 100.0
ORyear (%) No data available/missing 0.0
2002 0.0
2003 0.0
2004 0.0
2005 0.0
2006 0.0
2007 0.0
2008 0.0
2009 0.0
2010 0.0
2011 0.0
2012 0.0
2013 0.0
2014 0.0
2015 0.0
2016 0.0
2017 0.0
2018 65.7
2019 34.3
Age (mean (SD)) 72.743 (8.176)
Gender (%) female 25.7
male 74.3
TC_finalCU (mean (SD)) 168.311 (47.773)
LDL_finalCU (mean (SD)) 96.971 (38.196)
HDL_finalCU (mean (SD)) 43.897 (10.171)
TG_finalCU (mean (SD)) 171.469 (109.939)
TC_final (mean (SD)) 4.359 (1.237)
LDL_final (mean (SD)) 2.512 (0.989)
HDL_final (mean (SD)) 1.137 (0.263)
TG_final (mean (SD)) 1.938 (1.242)
systolic (mean (SD)) 153.265 (25.803)
diastoli (mean (SD)) 80.824 (16.129)
GFR_MDRD (mean (SD)) 83.278 (31.136)
BMI (mean (SD)) 26.477 (3.428)
KDOQI (%) No data available/missing 0.0
Normal kidney function 34.3
CKD 2 (Mild) 31.4
CKD 3 (Moderate) 22.9
CKD 4 (Severe) 0.0
CKD 5 (Failure) 0.0
<NA> 11.4
BMI_WHO (%) No data available/missing 0.0
Underweight 2.9
Normal 31.4
Overweight 42.9
Obese 14.3
<NA> 8.6
SmokerStatus (%) Current smoker 34.3
Ex-smoker 48.6
Never smoked 14.3
<NA> 2.9
AlcoholUse (%) No 37.1
Yes 57.1
<NA> 5.7
DiabetesStatus (%) Control (no Diabetes Dx/Med) 62.9
Diabetes 37.1
Hypertension.selfreport (%) No data available/missing 0.0
no 11.4
yes 85.7
<NA> 2.9
Hypertension.selfreportdrug (%) No data available/missing 0.0
no 11.4
yes 85.7
<NA> 2.9
Hypertension.composite (%) No data available/missing 0.0
no 5.7
yes 94.3
Hypertension.drugs (%) No data available/missing 0.0
no 5.7
yes 91.4
<NA> 2.9
Med.anticoagulants (%) No data available/missing 0.0
no 88.6
yes 5.7
<NA> 5.7
Med.all.antiplatelet (%) No data available/missing 0.0
no 25.7
yes 71.4
<NA> 2.9
Med.Statin.LLD (%) No data available/missing 0.0
no 20.0
yes 77.1
<NA> 2.9
Stroke_Dx (%) Missing 0.0
No stroke diagnosed 51.4
Stroke diagnosed 48.6
sympt (%) missing 0.0
Asymptomatic 17.1
TIA 14.3
minor stroke 34.3
Major stroke 8.6
Amaurosis fugax 14.3
Four vessel disease 0.0
Vertebrobasilary TIA 0.0
Retinal infarction 2.9
Symptomatic, but aspecific symtoms 0.0
Contralateral symptomatic occlusion 0.0
retinal infarction 2.9
armclaudication due to occlusion subclavian artery, CEA needed for bypass 0.0
retinal infarction + TIAs 0.0
Ocular ischemic syndrome 5.7
ischemisch glaucoom 0.0
subclavian steal syndrome 0.0
TGA 0.0
Symptoms.5G (%) Asymptomatic 17.1
Ocular 20.0
Other 0.0
Retinal infarction 5.7
Stroke 42.9
TIA 14.3
AsymptSympt (%) Asymptomatic 17.1
Ocular and others 25.7
Symptomatic 57.1
AsymptSympt2G (%) Asymptomatic 17.1
Symptomatic 82.9
restenos (%) missing 0.0
de novo 100.0
restenosis 0.0
stenose bij angioseal na PTCA 0.0
stenose (%) missing 0.0
0-49% 2.9
50-70% 17.1
70-90% 42.9
90-99% 17.1
100% (Occlusion) 0.0
NA 0.0
50-99% 0.0
70-99% 20.0
99 0.0
CAD_history (%) Missing 0.0
No history CAD 74.3
History CAD 25.7
PAOD (%) missing/no data 0.0
no 85.7
yes 14.3
Peripheral.interv (%) no 77.1
yes 20.0
<NA> 2.9
EP_composite (%) No data available. 0.0
No composite endpoints 42.9
Composite endpoints 11.4
<NA> 45.7
EP_composite_time (mean (SD)) 0.931 (0.483)
Writing the baseline table to Excel format.
# Write basetable
require(openxlsx)
write.xlsx(file = paste0(OUT_loc, "/",Today,".",PROJECTNAME,".AE.BaselineTable.scRNAseq.xlsx"),
format(scRNAseqDataMetaAE.all.tableOne, digits = 5, scientific = FALSE) , rowNames = TRUE, colNames = TRUE)
Here review the number of cells per sample, plate, and patients. And plot the ratio’s per sample and study number.
## check stuff
cat("\nHow many cells per type ...?")
How many cells per type ...?
sort(table(scRNAseqData@meta.data$SCT_snn_res.0.8))
17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 34 84 110 151 172 190 203 211 225 290 345 437 534 577 626 861 1110
# cat("\n\nHow many cells per plate ...?")
# sort(table(scRNAseqData@meta.data$ID))
# cat("\n\nHow many cells per type per plate ...?")
# table(scRNAseqData@meta.data$SCT_snn_res.0.8, scRNAseqData@meta.data$ID)
cat("\n\nHow many cells per patient ...?")
How many cells per patient ...?
sort(table(scRNAseqData@meta.data$Patient))
integer(0)
cat("\n\nVisualizing these ratio's per study number and sample ...?")
Visualizing these ratio's per study number and sample ...?
UMAPPlot(scRNAseqData, label = TRUE, pt.size = 1.25, label.size = 4, group.by = "ident",
repel = TRUE)
ggsave(paste0(PLOT_loc, "/", Today, ".UMAP.png"), plot = last_plot())
Saving 7.29 x 4.51 in image
ggsave(paste0(PLOT_loc, "/", Today, ".UMAP.ps"), plot = last_plot())
Saving 7.29 x 4.51 in image
# barplot(prop.table(x = table(scRNAseqData@active.ident, scRNAseqData@meta.data$Patient)),
# cex.axis = 1.0, cex.names = 0.5, las = 1,
# col = uithof_color, xlab = "study number", legend.text = FALSE, args.legend = list(x = "bottom"))
# dev.copy(pdf, paste0(QC_loc, "/", Today, ".cell_ratios_per_sample.pdf"))
# dev.off()
# barplot(prop.table(x = table(scRNAseqData@active.ident, scRNAseqData@meta.data$ID)),
# cex.axis = 1.0, cex.names = 0.5, las = 2,
# col = uithof_color, xlab = "sample ID", legend.text = FALSE, args.legend = list(x = "bottom"))
# dev.copy(pdf, paste0(QC_loc, "/", Today, ".cell_ratios_per_sample_per_plate.pdf"))
# dev.off()
Let’s project known cellular markers.
UMAPPlot(scRNAseqData, label = FALSE, pt.size = 1.25, label.size = 4, group.by = "ident",
repel = TRUE)
# endothelial cells
FeaturePlot(scRNAseqData, features = c("CD34"), cols = c("#ECECEC", "#DB003F"))
FeaturePlot(scRNAseqData, features = c("EDN1"), cols = c("#ECECEC", "#DB003F"))
FeaturePlot(scRNAseqData, features = c("EDNRA", "EDNRB"), cols = c("#ECECEC", "#DB003F"))
FeaturePlot(scRNAseqData, features = c("CDH5", "PECAM1"), cols = c("#ECECEC", "#DB003F"))
FeaturePlot(scRNAseqData, features = c("ACKR1"), cols = c("#ECECEC", "#DB003F"))
# SMC
FeaturePlot(scRNAseqData, features = c("MYH11"), cols = c("#ECECEC", "#DB003F"))
FeaturePlot(scRNAseqData, features = c("LGALS3", "ACTA2"), cols = c("#ECECEC", "#DB003F"))
# macrophages
FeaturePlot(scRNAseqData, features = c("CD14", "CD68"), cols = c("#ECECEC", "#DB003F"))
FeaturePlot(scRNAseqData, features = c("CD36"), cols = c("#ECECEC", "#DB003F"))
# t-cells
FeaturePlot(scRNAseqData, features = c("CD3E"), cols = c("#ECECEC", "#DB003F"))
FeaturePlot(scRNAseqData, features = c("CD4"), cols = c("#ECECEC", "#DB003F"))
# FeaturePlot(scRNAseqData, features = c("CD8"), cols = c("#ECECEC", "#DB003F"))
# b-cells
FeaturePlot(scRNAseqData, features = c("CD79A"), cols = c("#ECECEC", "#DB003F"))
# mast cells
FeaturePlot(scRNAseqData, features = c("KIT"), cols = c("#ECECEC", "#DB003F"))
# NK cells
FeaturePlot(scRNAseqData, features = c("NCAM1"), cols = c("#ECECEC", "#DB003F"))
We check whether the targets genes, C6orf195, EDN1, PHACTR1, TBC1D7, GFOD1, ENPP1, ENPP3, IGFBP3, AC011294.3, MTAP, RP11-145E5.5, C9orf53, CDKN2A, CDKN2B, ZNF485, ZNF32, AL137026.1, ARID5B, RTKN2, CAMK2G, VCL, AP3M1, ADK, KAT6B, DUPD1, DUSP13, SAMD8, VDAC2, COMTD1, FGF23, COL4A1, COL4A2, CHRNA5, CHRNB4, ADAMTS7, MORF4L1, CTSH, BCAM, PVRL2, TOMM40, APOE, APOC1, were sequenced using our method (STARseq).
Several genes are not present or have different names, these are listed here, and were manually removed from/changed in the list.
target_genes
[1] "C6orf195" "EDN1" "PHACTR1" "TBC1D7" "GFOD1" "ENPP1" "ENPP3" "IGFBP3"
[9] "AC011294.3" "MTAP" "RP11-145E5.5" "C9orf53" "CDKN2A" "CDKN2B" "ZNF485" "ZNF32"
[17] "AL137026.1" "ARID5B" "RTKN2" "CAMK2G" "VCL" "AP3M1" "ADK" "KAT6B"
[25] "DUPD1" "DUSP13" "SAMD8" "VDAC2" "COMTD1" "FGF23" "COL4A1" "COL4A2"
[33] "CHRNA5" "CHRNB4" "ADAMTS7" "MORF4L1" "CTSH" "BCAM" "PVRL2" "TOMM40"
[41] "APOE" "APOC1"
target_genes_rm <- c("AC011294.3", "C6orf195", "C9orf53", "AL137026.1", "DUPD1", "RP11-145E5.5", "PVRL2",
"RP1-257A7.4", "RP1-257A7.5", "KIAA1462",
"ZNF32", "BCAM")
temp = target_genes[!target_genes %in% target_genes_rm]
target_genes_qc <- c(temp, "NECTIN2", "JCAD")
target_genes_qc
[1] "EDN1" "PHACTR1" "TBC1D7" "GFOD1" "ENPP1" "ENPP3" "IGFBP3" "MTAP" "CDKN2A" "CDKN2B" "ZNF485" "ARID5B" "RTKN2"
[14] "CAMK2G" "VCL" "AP3M1" "ADK" "KAT6B" "DUSP13" "SAMD8" "VDAC2" "COMTD1" "FGF23" "COL4A1" "COL4A2" "CHRNA5"
[27] "CHRNB4" "ADAMTS7" "MORF4L1" "CTSH" "TOMM40" "APOE" "APOC1" "NECTIN2" "JCAD"
library(RColorBrewer)
p1 <- DotPlot(scRNAseqData, features = target_genes_qc,
cols = "RdBu")
p1 + theme(axis.text.x = element_text(angle = 45, hjust=1, size = 5))
ggsave(paste0(PLOT_loc, "/", Today, ".DotPlot.Targets.png"), plot = last_plot())
Saving 7.29 x 4.51 in image
ggsave(paste0(PLOT_loc, "/", Today, ".DotPlot.Targets.ps"), plot = last_plot())
Saving 7.29 x 4.51 in image
rm(p1)
# FeaturePlot(scRNAseqData, features = c(target_genes_qc),
# cols = c("#ECECEC", "#DB003F", "#9A3480","#1290D9"),
# combine = TRUE)
#
# ggsave(paste0(PLOT_loc, "/", Today, ".FeaturePlot.Targets.png"), plot = last_plot())
# ggsave(paste0(PLOT_loc, "/", Today, ".FeaturePlot.Targets.ps"), plot = last_plot())
# VlnPlot(scRNAseqData, features = "DUSP29")
for (GENE in target_genes_qc){
print(paste0("Projecting the expression of ", GENE, "."))
vp1 <- VlnPlot(scRNAseqData, features = GENE) +
xlab("cell communities") +
ylab(bquote("normalized expression")) +
theme(axis.title.x = element_text(color = "#000000", size = 14, face = "bold"),
axis.title.y = element_text(color = "#000000", size = 14, face = "bold"),
legend.position = "none")
ggsave(paste0(PLOT_loc, "/", Today, ".VlnPlot.",GENE,".png"), plot = last_plot())
ggsave(paste0(PLOT_loc, "/", Today, ".VlnPlot.",GENE,".ps"), plot = last_plot())
# print(vp1)
}
[1] "Projecting the expression of EDN1."
Saving 7 x 7 in image
Saving 7 x 7 in image
[1] "Projecting the expression of PHACTR1."
Saving 7 x 7 in image
Saving 7 x 7 in image
[1] "Projecting the expression of TBC1D7."
Saving 7 x 7 in image
Saving 7 x 7 in image
[1] "Projecting the expression of GFOD1."
Saving 7 x 7 in image
Saving 7 x 7 in image
[1] "Projecting the expression of ENPP1."
Saving 7 x 7 in image
Saving 7 x 7 in image
[1] "Projecting the expression of ENPP3."
Saving 7 x 7 in image
Saving 7 x 7 in image
[1] "Projecting the expression of IGFBP3."
Saving 7 x 7 in image
Saving 7 x 7 in image
[1] "Projecting the expression of MTAP."
Saving 7 x 7 in image
Saving 7 x 7 in image
[1] "Projecting the expression of CDKN2A."
Saving 7 x 7 in image
Saving 7 x 7 in image
[1] "Projecting the expression of CDKN2B."
Saving 7 x 7 in image
Saving 7 x 7 in image
[1] "Projecting the expression of ZNF485."
Saving 7 x 7 in image
Saving 7 x 7 in image
[1] "Projecting the expression of ARID5B."
Saving 7 x 7 in image
Saving 7 x 7 in image
[1] "Projecting the expression of RTKN2."
Saving 7 x 7 in image
Saving 7 x 7 in image
[1] "Projecting the expression of CAMK2G."
Saving 7 x 7 in image
Saving 7 x 7 in image
[1] "Projecting the expression of VCL."
Saving 7 x 7 in image
Saving 7 x 7 in image
[1] "Projecting the expression of AP3M1."
Saving 7 x 7 in image
Saving 7 x 7 in image
[1] "Projecting the expression of ADK."
Saving 7 x 7 in image
Saving 7 x 7 in image
[1] "Projecting the expression of KAT6B."
Saving 7 x 7 in image
Saving 7 x 7 in image
[1] "Projecting the expression of DUSP13."
Saving 7 x 7 in image
Saving 7 x 7 in image
[1] "Projecting the expression of SAMD8."
Saving 7 x 7 in image
Saving 7 x 7 in image
[1] "Projecting the expression of VDAC2."
Saving 7 x 7 in image
Saving 7 x 7 in image
[1] "Projecting the expression of COMTD1."
Saving 7 x 7 in image
Saving 7 x 7 in image
[1] "Projecting the expression of FGF23."
Saving 7 x 7 in image
Saving 7 x 7 in image
[1] "Projecting the expression of COL4A1."
Saving 7 x 7 in image
Saving 7 x 7 in image
[1] "Projecting the expression of COL4A2."
Saving 7 x 7 in image
Saving 7 x 7 in image
[1] "Projecting the expression of CHRNA5."
Saving 7 x 7 in image
Saving 7 x 7 in image
[1] "Projecting the expression of CHRNB4."
Saving 7 x 7 in image
Saving 7 x 7 in image
[1] "Projecting the expression of ADAMTS7."
Saving 7 x 7 in image
Saving 7 x 7 in image
[1] "Projecting the expression of MORF4L1."
Saving 7 x 7 in image
Saving 7 x 7 in image
[1] "Projecting the expression of CTSH."
Saving 7 x 7 in image
Saving 7 x 7 in image
[1] "Projecting the expression of TOMM40."
Saving 7 x 7 in image
Saving 7 x 7 in image
[1] "Projecting the expression of APOE."
Saving 7 x 7 in image
Saving 7 x 7 in image
[1] "Projecting the expression of APOC1."
Saving 7 x 7 in image
Saving 7 x 7 in image
[1] "Projecting the expression of NECTIN2."
Saving 7 x 7 in image
Saving 7 x 7 in image
[1] "Projecting the expression of JCAD."
Saving 7 x 7 in image
Saving 7 x 7 in image
Here we project genes to only the broad cell communities:
Comparison between the macrophages cell communities (CD14/CD68+), and all other communities.
N_GENES=20552
MAC.markers <- FindMarkers(object = scRNAseqData,
ident.1 = c("CD14+CD68+ M I",
"CD14+CD68+ M II",
"CD14+CD68+ M III"),
ident.2 = c(#"CD14+CD68+ M I",
#"CD14+CD68+ M II",
#"CD14+CD68+ M III",
"CD3+CD8A+ T I",
"CD3+CD8A+ T II ",
"CD3+CD8A+ T III",
"CD3+CD4+ T I",
"CD3+CD4+ T II",
"CD3+ Treg",
"CD34+ EC I", "CD34+ EC II",
"Mixed I",
"Mixed II",
"ACTA2+ SMC",
"NCAM1+ NK",
"KIT+ MC",
"CD79A+ B I",
"CD79A+ B II"))
DT::datatable(MAC.markers)
MAC_Volcano_TargetsA = EnhancedVolcano(MAC.markers,
lab = rownames(MAC.markers),
x = "avg_log2FC",
y = "p_val_adj",
selectLab = target_genes_qc,
axisLabSize = 12,
xlab = "average fold-change",
title = "Macrophage markers\n(Macrophage communities vs the rest)",
titleLabSize = 14,
pCutoff = 0.05/N_GENES, # 20552 genes
FCcutoff = 1.25,
pointSize = 1.5,
labSize = 3.0,
legendLabels =c('NS','avg. fold-change','P',
'P & avg. fold-change'),
legendPosition = "right",
legendLabSize = 10,
legendIconSize = 3.0,
drawConnectors = TRUE,
widthConnectors = 0.2,
colConnectors = "#595A5C",
gridlines.major = FALSE,
gridlines.minor = FALSE)
MAC_Volcano_TargetsA
ggsave(paste0(PLOT_loc, "/", Today, ".Volcano.MAC.DEG.Targets.pdf"),
plot = MAC_Volcano_TargetsA)
Saving 7.29 x 4.51 in image
The target results are given below and written to a file.
library(tibble)
MAC.markers <- add_column(MAC.markers, Gene = row.names(MAC.markers), .before = 1)
temp <- MAC.markers[MAC.markers$Gene %in% target_genes_qc,]
DT::datatable(temp)
fwrite(temp, file = paste0(OUT_loc, "/", Today, ".MAC.DEG.Targets.txt"),
quote = FALSE,
sep = "\t",
showProgress = FALSE, verbose = FALSE)
Comparison between the smooth muscle cell communities (ACTA2+), and all other communities.
N_GENES=20552
SMC.markers <- FindMarkers(object = scRNAseqData,
ident.1 = c("ACTA2+ SMC"),
ident.2 = c("CD14+CD68+ M I",
"CD14+CD68+ M II",
"CD14+CD68+ M III",
"CD3+CD8A+ T I",
"CD3+CD8A+ T II ",
"CD3+CD8A+ T III",
"CD3+CD4+ T I",
"CD3+CD4+ T II",
"CD3+ Treg",
"CD34+ EC I", "CD34+ EC II",
"Mixed I",
"Mixed II",
# "ACTA2+ SMC",
"NCAM1+ NK",
"KIT+ MC",
"CD79A+ B I",
"CD79A+ B II"))
| | 0 % ~calculating
|+ | 1 % ~01m 03s
|++ | 2 % ~01m 04s
|++ | 3 % ~59s
|+++ | 4 % ~56s
|+++ | 5 % ~53s
|++++ | 6 % ~01m 09s
|++++ | 7 % ~01m 05s
|+++++ | 9 % ~01m 02s
|+++++ | 10% ~60s
|++++++ | 11% ~58s
|++++++ | 12% ~56s
|+++++++ | 13% ~54s
|+++++++ | 14% ~52s
|++++++++ | 15% ~53s
|++++++++ | 16% ~51s
|+++++++++ | 17% ~50s
|++++++++++ | 18% ~49s
|++++++++++ | 19% ~47s
|+++++++++++ | 20% ~46s
|+++++++++++ | 21% ~45s
|++++++++++++ | 22% ~44s
|++++++++++++ | 23% ~43s
|+++++++++++++ | 24% ~42s
|+++++++++++++ | 26% ~42s
|++++++++++++++ | 27% ~41s
|++++++++++++++ | 28% ~40s
|+++++++++++++++ | 29% ~40s
|+++++++++++++++ | 30% ~39s
|++++++++++++++++ | 31% ~39s
|++++++++++++++++ | 32% ~38s
|+++++++++++++++++ | 33% ~38s
|++++++++++++++++++ | 34% ~37s
|++++++++++++++++++ | 35% ~36s
|+++++++++++++++++++ | 36% ~35s
|+++++++++++++++++++ | 37% ~35s
|++++++++++++++++++++ | 38% ~34s
|++++++++++++++++++++ | 39% ~34s
|+++++++++++++++++++++ | 40% ~34s
|+++++++++++++++++++++ | 41% ~33s
|++++++++++++++++++++++ | 43% ~32s
|++++++++++++++++++++++ | 44% ~32s
|+++++++++++++++++++++++ | 45% ~31s
|+++++++++++++++++++++++ | 46% ~30s
|++++++++++++++++++++++++ | 47% ~30s
|++++++++++++++++++++++++ | 48% ~29s
|+++++++++++++++++++++++++ | 49% ~28s
|+++++++++++++++++++++++++ | 50% ~28s
|++++++++++++++++++++++++++ | 51% ~27s
|+++++++++++++++++++++++++++ | 52% ~26s
|+++++++++++++++++++++++++++ | 53% ~26s
|++++++++++++++++++++++++++++ | 54% ~25s
|++++++++++++++++++++++++++++ | 55% ~24s
|+++++++++++++++++++++++++++++ | 56% ~24s
|+++++++++++++++++++++++++++++ | 57% ~23s
|++++++++++++++++++++++++++++++ | 59% ~23s
|++++++++++++++++++++++++++++++ | 60% ~22s
|+++++++++++++++++++++++++++++++ | 61% ~21s
|+++++++++++++++++++++++++++++++ | 62% ~21s
|++++++++++++++++++++++++++++++++ | 63% ~20s
|++++++++++++++++++++++++++++++++ | 64% ~20s
|+++++++++++++++++++++++++++++++++ | 65% ~19s
|+++++++++++++++++++++++++++++++++ | 66% ~19s
|++++++++++++++++++++++++++++++++++ | 67% ~18s
|+++++++++++++++++++++++++++++++++++ | 68% ~17s
|+++++++++++++++++++++++++++++++++++ | 69% ~17s
|++++++++++++++++++++++++++++++++++++ | 70% ~16s
|++++++++++++++++++++++++++++++++++++ | 71% ~16s
|+++++++++++++++++++++++++++++++++++++ | 72% ~15s
|+++++++++++++++++++++++++++++++++++++ | 73% ~15s
|++++++++++++++++++++++++++++++++++++++ | 74% ~14s
|++++++++++++++++++++++++++++++++++++++ | 76% ~13s
|+++++++++++++++++++++++++++++++++++++++ | 77% ~13s
|+++++++++++++++++++++++++++++++++++++++ | 78% ~12s
|++++++++++++++++++++++++++++++++++++++++ | 79% ~12s
|++++++++++++++++++++++++++++++++++++++++ | 80% ~11s
|+++++++++++++++++++++++++++++++++++++++++ | 81% ~10s
|+++++++++++++++++++++++++++++++++++++++++ | 82% ~10s
|++++++++++++++++++++++++++++++++++++++++++ | 83% ~09s
|+++++++++++++++++++++++++++++++++++++++++++ | 84% ~09s
|+++++++++++++++++++++++++++++++++++++++++++ | 85% ~08s
|++++++++++++++++++++++++++++++++++++++++++++ | 86% ~08s
|++++++++++++++++++++++++++++++++++++++++++++ | 87% ~07s
|+++++++++++++++++++++++++++++++++++++++++++++ | 88% ~06s
|+++++++++++++++++++++++++++++++++++++++++++++ | 89% ~06s
|++++++++++++++++++++++++++++++++++++++++++++++ | 90% ~05s
|++++++++++++++++++++++++++++++++++++++++++++++ | 91% ~05s
|+++++++++++++++++++++++++++++++++++++++++++++++ | 93% ~04s
|+++++++++++++++++++++++++++++++++++++++++++++++ | 94% ~03s
|++++++++++++++++++++++++++++++++++++++++++++++++ | 95% ~03s
|++++++++++++++++++++++++++++++++++++++++++++++++ | 96% ~02s
|+++++++++++++++++++++++++++++++++++++++++++++++++ | 97% ~02s
|+++++++++++++++++++++++++++++++++++++++++++++++++ | 98% ~01s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 99% ~01s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=53s
DT::datatable(SMC.markers)
SMC_Volcano_TargetsA = EnhancedVolcano(SMC.markers,
lab = rownames(SMC.markers),
x = "avg_log2FC",
y = "p_val_adj",
selectLab = target_genes_qc,
axisLabSize = 12,
xlab = "average fold-change",
title = "SMC markers\n(SMC communities vs the rest)",
titleLabSize = 14,
pCutoff = 0.05/N_GENES, # 20552 genes
FCcutoff = 1.25,
pointSize = 1.5,
labSize = 3.0,
legendLabels =c('NS','avg. fold-change','P',
'P & avg. fold-change'),
legendPosition = "right",
legendLabSize = 10,
legendIconSize = 3.0,
drawConnectors = TRUE,
widthConnectors = 0.2,
colConnectors = "#595A5C",
gridlines.major = FALSE,
gridlines.minor = FALSE)
SMC_Volcano_TargetsA
ggsave(paste0(PLOT_loc, "/", Today, ".Volcano.SMC.DEG.Targets.pdf"),
plot = SMC_Volcano_TargetsA)
Saving 7.29 x 4.51 in image
The target results are given below and written to a file.
library(tibble)
SMC.markers <- add_column(SMC.markers, Gene = row.names(SMC.markers), .before = 1)
temp <- SMC.markers[SMC.markers$Gene %in% target_genes_qc,]
DT::datatable(temp)
fwrite(temp, file = paste0(OUT_loc, "/", Today, ".SMC.DEG.Targets.txt"),
quote = FALSE,
sep = "\t",
showProgress = FALSE, verbose = FALSE)
Comparison between the endothelial cell communities (CD34+), and all other communities.
N_GENES=20552
EC.markers <- FindMarkers(object = scRNAseqData,
ident.1 = c("CD34+ EC I", "CD34+ EC II"),
ident.2 = c("CD14+CD68+ M I",
"CD14+CD68+ M II",
"CD14+CD68+ M III",
"CD3+CD8A+ T I",
"CD3+CD8A+ T II ",
"CD3+CD8A+ T III",
"CD3+CD4+ T I",
"CD3+CD4+ T II",
"CD3+ Treg",
# "CD34+ EC I", "CD34+ EC II",
"Mixed I",
"Mixed II",
"ACTA2+ SMC",
"NCAM1+ NK",
"KIT+ MC",
"CD79A+ B I",
"CD79A+ B II"))
| | 0 % ~calculating
|+ | 1 % ~47s
|++ | 2 % ~46s
|++ | 3 % ~45s
|+++ | 4 % ~44s
|+++ | 5 % ~43s
|++++ | 6 % ~42s
|++++ | 8 % ~41s
|+++++ | 9 % ~40s
|+++++ | 10% ~40s
|++++++ | 11% ~40s
|++++++ | 12% ~39s
|+++++++ | 13% ~41s
|+++++++ | 14% ~40s
|++++++++ | 15% ~39s
|+++++++++ | 16% ~39s
|+++++++++ | 17% ~38s
|++++++++++ | 18% ~37s
|++++++++++ | 19% ~37s
|+++++++++++ | 20% ~36s
|+++++++++++ | 22% ~36s
|++++++++++++ | 23% ~35s
|++++++++++++ | 24% ~34s
|+++++++++++++ | 25% ~34s
|+++++++++++++ | 26% ~33s
|++++++++++++++ | 27% ~33s
|++++++++++++++ | 28% ~33s
|+++++++++++++++ | 29% ~32s
|++++++++++++++++ | 30% ~31s
|++++++++++++++++ | 31% ~31s
|+++++++++++++++++ | 32% ~31s
|+++++++++++++++++ | 33% ~30s
|++++++++++++++++++ | 34% ~30s
|++++++++++++++++++ | 35% ~29s
|+++++++++++++++++++ | 37% ~29s
|+++++++++++++++++++ | 38% ~29s
|++++++++++++++++++++ | 39% ~28s
|++++++++++++++++++++ | 40% ~28s
|+++++++++++++++++++++ | 41% ~27s
|+++++++++++++++++++++ | 42% ~27s
|++++++++++++++++++++++ | 43% ~26s
|+++++++++++++++++++++++ | 44% ~26s
|+++++++++++++++++++++++ | 45% ~25s
|++++++++++++++++++++++++ | 46% ~24s
|++++++++++++++++++++++++ | 47% ~24s
|+++++++++++++++++++++++++ | 48% ~23s
|+++++++++++++++++++++++++ | 49% ~23s
|++++++++++++++++++++++++++ | 51% ~22s
|++++++++++++++++++++++++++ | 52% ~22s
|+++++++++++++++++++++++++++ | 53% ~21s
|+++++++++++++++++++++++++++ | 54% ~21s
|++++++++++++++++++++++++++++ | 55% ~20s
|++++++++++++++++++++++++++++ | 56% ~20s
|+++++++++++++++++++++++++++++ | 57% ~20s
|++++++++++++++++++++++++++++++ | 58% ~20s
|++++++++++++++++++++++++++++++ | 59% ~19s
|+++++++++++++++++++++++++++++++ | 60% ~19s
|+++++++++++++++++++++++++++++++ | 61% ~18s
|++++++++++++++++++++++++++++++++ | 62% ~18s
|++++++++++++++++++++++++++++++++ | 63% ~17s
|+++++++++++++++++++++++++++++++++ | 65% ~17s
|+++++++++++++++++++++++++++++++++ | 66% ~16s
|++++++++++++++++++++++++++++++++++ | 67% ~16s
|++++++++++++++++++++++++++++++++++ | 68% ~16s
|+++++++++++++++++++++++++++++++++++ | 69% ~15s
|+++++++++++++++++++++++++++++++++++ | 70% ~15s
|++++++++++++++++++++++++++++++++++++ | 71% ~14s
|+++++++++++++++++++++++++++++++++++++ | 72% ~14s
|+++++++++++++++++++++++++++++++++++++ | 73% ~13s
|++++++++++++++++++++++++++++++++++++++ | 74% ~13s
|++++++++++++++++++++++++++++++++++++++ | 75% ~12s
|+++++++++++++++++++++++++++++++++++++++ | 76% ~12s
|+++++++++++++++++++++++++++++++++++++++ | 77% ~11s
|++++++++++++++++++++++++++++++++++++++++ | 78% ~11s
|++++++++++++++++++++++++++++++++++++++++ | 80% ~10s
|+++++++++++++++++++++++++++++++++++++++++ | 81% ~10s
|+++++++++++++++++++++++++++++++++++++++++ | 82% ~09s
|++++++++++++++++++++++++++++++++++++++++++ | 83% ~09s
|++++++++++++++++++++++++++++++++++++++++++ | 84% ~08s
|+++++++++++++++++++++++++++++++++++++++++++ | 85% ~07s
|++++++++++++++++++++++++++++++++++++++++++++ | 86% ~07s
|++++++++++++++++++++++++++++++++++++++++++++ | 87% ~06s
|+++++++++++++++++++++++++++++++++++++++++++++ | 88% ~06s
|+++++++++++++++++++++++++++++++++++++++++++++ | 89% ~05s
|++++++++++++++++++++++++++++++++++++++++++++++ | 90% ~05s
|++++++++++++++++++++++++++++++++++++++++++++++ | 91% ~04s
|+++++++++++++++++++++++++++++++++++++++++++++++ | 92% ~04s
|+++++++++++++++++++++++++++++++++++++++++++++++ | 94% ~03s
|++++++++++++++++++++++++++++++++++++++++++++++++ | 95% ~03s
|++++++++++++++++++++++++++++++++++++++++++++++++ | 96% ~02s
|+++++++++++++++++++++++++++++++++++++++++++++++++ | 97% ~02s
|+++++++++++++++++++++++++++++++++++++++++++++++++ | 98% ~01s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 99% ~01s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=49s
DT::datatable(EC.markers)
EC_Volcano_TargetsA = EnhancedVolcano(EC.markers,
lab = rownames(EC.markers),
x = "avg_log2FC",
y = "p_val_adj",
selectLab = target_genes_qc,
axisLabSize = 12,
xlab = "average fold-change",
title = "Endothelial cell markers\n(EC communities vs the rest)",
titleLabSize = 14,
pCutoff = 0.05/N_GENES, # 20552 genes
FCcutoff = 1.25,
pointSize = 1.5,
labSize = 3.0,
legendLabels =c('NS','avg. fold-change','P',
'P & avg. fold-change'),
legendPosition = "right",
legendLabSize = 10,
legendIconSize = 3.0,
drawConnectors = TRUE,
widthConnectors = 0.2,
colConnectors = "#595A5C",
gridlines.major = FALSE,
gridlines.minor = FALSE)
EC_Volcano_TargetsA
ggsave(paste0(PLOT_loc, "/", Today, ".Volcano.EC.DEG.Targets.pdf"),
plot = EC_Volcano_TargetsA)
Saving 7.29 x 4.51 in image
The target results are given below and written to a file.
library(tibble)
EC.markers <- add_column(EC.markers, Gene = row.names(EC.markers), .before = 1)
temp <- EC.markers[EC.markers$Gene %in% target_genes_qc,]
DT::datatable(temp)
fwrite(temp, file = paste0(OUT_loc, "/", Today, ".EC.DEG.Targets.txt"),
quote = FALSE,
sep = "\t",
showProgress = FALSE, verbose = FALSE)
Comparison between the T-cell communities (CD3/CD4/CD8+), and all other communities.
N_GENES=20552
TC.markers <- FindMarkers(object = scRNAseqData,
ident.1 = c("CD3+CD8A+ T I",
"CD3+CD8A+ T II ",
"CD3+CD8A+ T III",
"CD3+CD4+ T I",
"CD3+CD4+ T II",
"CD3+ Treg"),
ident.2 = c("CD14+CD68+ M I",
"CD14+CD68+ M II",
"CD14+CD68+ M III",
# "CD3+CD8+ T I",
# "CD3+CD8A+ T II ",
# "CD3+CD8 T III",
# "CD3+CD4+ T I",
# "CD3+CD4+ T II",
# "CD3+CD4+ T III",
"CD34+ EC I", "CD34+ EC II",
"Mixed I",
"Mixed II",
"ACTA2+ SMC",
"NCAM1+ NK",
"KIT+ MC",
"CD79A+ B I",
"CD79A+ B II"))
| | 0 % ~calculating
|+ | 1 % ~41s
|++ | 2 % ~37s
|++ | 3 % ~36s
|+++ | 4 % ~36s
|+++ | 5 % ~36s
|++++ | 6 % ~35s
|++++ | 7 % ~34s
|+++++ | 8 % ~34s
|+++++ | 9 % ~33s
|++++++ | 11% ~33s
|++++++ | 12% ~33s
|+++++++ | 13% ~33s
|+++++++ | 14% ~32s
|++++++++ | 15% ~32s
|++++++++ | 16% ~31s
|+++++++++ | 17% ~33s
|+++++++++ | 18% ~32s
|++++++++++ | 19% ~32s
|++++++++++ | 20% ~31s
|+++++++++++ | 21% ~31s
|++++++++++++ | 22% ~30s
|++++++++++++ | 23% ~30s
|+++++++++++++ | 24% ~29s
|+++++++++++++ | 25% ~29s
|++++++++++++++ | 26% ~28s
|++++++++++++++ | 27% ~28s
|+++++++++++++++ | 28% ~27s
|+++++++++++++++ | 29% ~27s
|++++++++++++++++ | 31% ~26s
|++++++++++++++++ | 32% ~26s
|+++++++++++++++++ | 33% ~26s
|+++++++++++++++++ | 34% ~25s
|++++++++++++++++++ | 35% ~25s
|++++++++++++++++++ | 36% ~25s
|+++++++++++++++++++ | 37% ~24s
|+++++++++++++++++++ | 38% ~24s
|++++++++++++++++++++ | 39% ~23s
|++++++++++++++++++++ | 40% ~23s
|+++++++++++++++++++++ | 41% ~22s
|++++++++++++++++++++++ | 42% ~22s
|++++++++++++++++++++++ | 43% ~21s
|+++++++++++++++++++++++ | 44% ~21s
|+++++++++++++++++++++++ | 45% ~21s
|++++++++++++++++++++++++ | 46% ~20s
|++++++++++++++++++++++++ | 47% ~25s
|+++++++++++++++++++++++++ | 48% ~25s
|+++++++++++++++++++++++++ | 49% ~24s
|++++++++++++++++++++++++++ | 51% ~24s
|++++++++++++++++++++++++++ | 52% ~23s
|+++++++++++++++++++++++++++ | 53% ~22s
|+++++++++++++++++++++++++++ | 54% ~22s
|++++++++++++++++++++++++++++ | 55% ~21s
|++++++++++++++++++++++++++++ | 56% ~21s
|+++++++++++++++++++++++++++++ | 57% ~20s
|+++++++++++++++++++++++++++++ | 58% ~19s
|++++++++++++++++++++++++++++++ | 59% ~19s
|++++++++++++++++++++++++++++++ | 60% ~18s
|+++++++++++++++++++++++++++++++ | 61% ~18s
|++++++++++++++++++++++++++++++++ | 62% ~17s
|++++++++++++++++++++++++++++++++ | 63% ~17s
|+++++++++++++++++++++++++++++++++ | 64% ~16s
|+++++++++++++++++++++++++++++++++ | 65% ~16s
|++++++++++++++++++++++++++++++++++ | 66% ~15s
|++++++++++++++++++++++++++++++++++ | 67% ~15s
|+++++++++++++++++++++++++++++++++++ | 68% ~14s
|+++++++++++++++++++++++++++++++++++ | 69% ~14s
|++++++++++++++++++++++++++++++++++++ | 71% ~13s
|++++++++++++++++++++++++++++++++++++ | 72% ~13s
|+++++++++++++++++++++++++++++++++++++ | 73% ~12s
|+++++++++++++++++++++++++++++++++++++ | 74% ~12s
|++++++++++++++++++++++++++++++++++++++ | 75% ~11s
|++++++++++++++++++++++++++++++++++++++ | 76% ~11s
|+++++++++++++++++++++++++++++++++++++++ | 77% ~10s
|+++++++++++++++++++++++++++++++++++++++ | 78% ~10s
|++++++++++++++++++++++++++++++++++++++++ | 79% ~09s
|++++++++++++++++++++++++++++++++++++++++ | 80% ~09s
|+++++++++++++++++++++++++++++++++++++++++ | 81% ~08s
|++++++++++++++++++++++++++++++++++++++++++ | 82% ~08s
|++++++++++++++++++++++++++++++++++++++++++ | 83% ~07s
|+++++++++++++++++++++++++++++++++++++++++++ | 84% ~07s
|+++++++++++++++++++++++++++++++++++++++++++ | 85% ~07s
|++++++++++++++++++++++++++++++++++++++++++++ | 86% ~06s
|++++++++++++++++++++++++++++++++++++++++++++ | 87% ~06s
|+++++++++++++++++++++++++++++++++++++++++++++ | 88% ~05s
|+++++++++++++++++++++++++++++++++++++++++++++ | 89% ~05s
|++++++++++++++++++++++++++++++++++++++++++++++ | 91% ~04s
|++++++++++++++++++++++++++++++++++++++++++++++ | 92% ~04s
|+++++++++++++++++++++++++++++++++++++++++++++++ | 93% ~03s
|+++++++++++++++++++++++++++++++++++++++++++++++ | 94% ~03s
|++++++++++++++++++++++++++++++++++++++++++++++++ | 95% ~02s
|++++++++++++++++++++++++++++++++++++++++++++++++ | 96% ~02s
|+++++++++++++++++++++++++++++++++++++++++++++++++ | 97% ~01s
|+++++++++++++++++++++++++++++++++++++++++++++++++ | 98% ~01s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 99% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=43s
DT::datatable(TC.markers)
TC_Volcano_TargetsA = EnhancedVolcano(TC.markers,
lab = rownames(TC.markers),
x = "avg_log2FC",
y = "p_val_adj",
selectLab = target_genes_qc,
axisLabSize = 12,
xlab = "average fold-change",
title = "T-cell markers\n(T-cell communities vs the rest)",
titleLabSize = 14,
pCutoff = 0.05/N_GENES, # 20552 genes
FCcutoff = 1.25,
pointSize = 1.5,
labSize = 3.0,
legendLabels =c('NS','avg. fold-change','P',
'P & avg. fold-change'),
legendPosition = "right",
legendLabSize = 10,
legendIconSize = 3.0,
drawConnectors = TRUE,
widthConnectors = 0.2,
colConnectors = "#595A5C",
gridlines.major = FALSE,
gridlines.minor = FALSE)
TC_Volcano_TargetsA
ggsave(paste0(PLOT_loc, "/", Today, ".Volcano.TC.DEG.Targets.pdf"),
plot = TC_Volcano_TargetsA)
Saving 7.29 x 4.51 in image
The target results are given below and written to a file.
library(tibble)
TC.markers <- add_column(TC.markers, Gene = row.names(TC.markers), .before = 1)
temp <- TC.markers[TC.markers$Gene %in% target_genes_qc,]
DT::datatable(temp)
fwrite(temp, file = paste0(OUT_loc, "/", Today, ".TC.DEG.Targets.txt"),
quote = FALSE,
sep = "\t",
showProgress = FALSE, verbose = FALSE)
Comparison between the B-cell communities (CD79A+), and all other communities.
N_GENES=20552
BC.markers <- FindMarkers(object = scRNAseqData,
ident.1 = c("CD79A+ B I",
"CD79A+ B II"),
ident.2 = c("CD14+CD68+ M I",
"CD14+CD68+ M II",
"CD14+CD68+ M III",
"CD3+CD8A+ T I",
"CD3+CD8A+ T II ",
"CD3+CD8A+ T III",
"CD3+CD4+ T I",
"CD3+CD4+ T II",
"CD3+ Treg",
"CD34+ EC I", "CD34+ EC II",
"Mixed I",
"Mixed II",
"ACTA2+ SMC",
"NCAM1+ NK",
"KIT+ MC"))
| | 0 % ~calculating
|+ | 1 % ~26s
|++ | 2 % ~26s
|++ | 3 % ~25s
|+++ | 4 % ~25s
|+++ | 5 % ~24s
|++++ | 6 % ~24s
|++++ | 7 % ~24s
|+++++ | 8 % ~23s
|+++++ | 9 % ~23s
|++++++ | 10% ~23s
|++++++ | 11% ~23s
|+++++++ | 12% ~24s
|+++++++ | 13% ~24s
|++++++++ | 14% ~23s
|++++++++ | 15% ~23s
|+++++++++ | 16% ~23s
|+++++++++ | 17% ~22s
|++++++++++ | 18% ~22s
|++++++++++ | 19% ~21s
|+++++++++++ | 20% ~21s
|+++++++++++ | 21% ~21s
|++++++++++++ | 22% ~20s
|++++++++++++ | 23% ~20s
|+++++++++++++ | 24% ~20s
|+++++++++++++ | 26% ~19s
|++++++++++++++ | 27% ~19s
|++++++++++++++ | 28% ~19s
|+++++++++++++++ | 29% ~19s
|+++++++++++++++ | 30% ~18s
|++++++++++++++++ | 31% ~18s
|++++++++++++++++ | 32% ~18s
|+++++++++++++++++ | 33% ~18s
|+++++++++++++++++ | 34% ~18s
|++++++++++++++++++ | 35% ~17s
|++++++++++++++++++ | 36% ~17s
|+++++++++++++++++++ | 37% ~17s
|+++++++++++++++++++ | 38% ~17s
|++++++++++++++++++++ | 39% ~16s
|++++++++++++++++++++ | 40% ~16s
|+++++++++++++++++++++ | 41% ~16s
|+++++++++++++++++++++ | 42% ~16s
|++++++++++++++++++++++ | 43% ~15s
|++++++++++++++++++++++ | 44% ~15s
|+++++++++++++++++++++++ | 45% ~15s
|+++++++++++++++++++++++ | 46% ~15s
|++++++++++++++++++++++++ | 47% ~14s
|++++++++++++++++++++++++ | 48% ~14s
|+++++++++++++++++++++++++ | 49% ~14s
|+++++++++++++++++++++++++ | 50% ~14s
|++++++++++++++++++++++++++ | 51% ~14s
|+++++++++++++++++++++++++++ | 52% ~13s
|+++++++++++++++++++++++++++ | 53% ~13s
|++++++++++++++++++++++++++++ | 54% ~13s
|++++++++++++++++++++++++++++ | 55% ~12s
|+++++++++++++++++++++++++++++ | 56% ~12s
|+++++++++++++++++++++++++++++ | 57% ~12s
|++++++++++++++++++++++++++++++ | 58% ~11s
|++++++++++++++++++++++++++++++ | 59% ~11s
|+++++++++++++++++++++++++++++++ | 60% ~11s
|+++++++++++++++++++++++++++++++ | 61% ~10s
|++++++++++++++++++++++++++++++++ | 62% ~10s
|++++++++++++++++++++++++++++++++ | 63% ~10s
|+++++++++++++++++++++++++++++++++ | 64% ~10s
|+++++++++++++++++++++++++++++++++ | 65% ~09s
|++++++++++++++++++++++++++++++++++ | 66% ~09s
|++++++++++++++++++++++++++++++++++ | 67% ~09s
|+++++++++++++++++++++++++++++++++++ | 68% ~08s
|+++++++++++++++++++++++++++++++++++ | 69% ~08s
|++++++++++++++++++++++++++++++++++++ | 70% ~08s
|++++++++++++++++++++++++++++++++++++ | 71% ~08s
|+++++++++++++++++++++++++++++++++++++ | 72% ~07s
|+++++++++++++++++++++++++++++++++++++ | 73% ~07s
|++++++++++++++++++++++++++++++++++++++ | 74% ~07s
|++++++++++++++++++++++++++++++++++++++ | 76% ~07s
|+++++++++++++++++++++++++++++++++++++++ | 77% ~06s
|+++++++++++++++++++++++++++++++++++++++ | 78% ~06s
|++++++++++++++++++++++++++++++++++++++++ | 79% ~06s
|++++++++++++++++++++++++++++++++++++++++ | 80% ~06s
|+++++++++++++++++++++++++++++++++++++++++ | 81% ~05s
|+++++++++++++++++++++++++++++++++++++++++ | 82% ~05s
|++++++++++++++++++++++++++++++++++++++++++ | 83% ~05s
|++++++++++++++++++++++++++++++++++++++++++ | 84% ~05s
|+++++++++++++++++++++++++++++++++++++++++++ | 85% ~04s
|+++++++++++++++++++++++++++++++++++++++++++ | 86% ~04s
|++++++++++++++++++++++++++++++++++++++++++++ | 87% ~04s
|++++++++++++++++++++++++++++++++++++++++++++ | 88% ~03s
|+++++++++++++++++++++++++++++++++++++++++++++ | 89% ~03s
|+++++++++++++++++++++++++++++++++++++++++++++ | 90% ~03s
|++++++++++++++++++++++++++++++++++++++++++++++ | 91% ~03s
|++++++++++++++++++++++++++++++++++++++++++++++ | 92% ~02s
|+++++++++++++++++++++++++++++++++++++++++++++++ | 93% ~02s
|+++++++++++++++++++++++++++++++++++++++++++++++ | 94% ~02s
|++++++++++++++++++++++++++++++++++++++++++++++++ | 95% ~01s
|++++++++++++++++++++++++++++++++++++++++++++++++ | 96% ~01s
|+++++++++++++++++++++++++++++++++++++++++++++++++ | 97% ~01s
|+++++++++++++++++++++++++++++++++++++++++++++++++ | 98% ~01s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 99% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=27s
DT::datatable(BC.markers)
BC_Volcano_TargetsA = EnhancedVolcano(BC.markers,
lab = rownames(BC.markers),
x = "avg_log2FC",
y = "p_val_adj",
selectLab = target_genes_qc,
axisLabSize = 12,
xlab = "average fold-change",
title = "B-cell markers\n(B-cell communities vs the rest)",
titleLabSize = 14,
pCutoff = 0.05/N_GENES, # 20552 genes
FCcutoff = 1.25,
pointSize = 1.5,
labSize = 3.0,
legendLabels =c('NS','avg. fold-change','P',
'P & avg. fold-change'),
legendPosition = "right",
legendLabSize = 10,
legendIconSize = 3.0,
drawConnectors = TRUE,
widthConnectors = 0.2,
colConnectors = "#595A5C",
gridlines.major = FALSE,
gridlines.minor = FALSE)
BC_Volcano_TargetsA
ggsave(paste0(PLOT_loc, "/", Today, ".Volcano.BC.DEG.Targets.pdf"),
plot = BC_Volcano_TargetsA)
Saving 7.29 x 4.51 in image
The target results are given below and written to a file.
library(tibble)
BC.markers <- add_column(BC.markers, Gene = row.names(BC.markers), .before = 1)
temp <- BC.markers[BC.markers$Gene %in% target_genes_qc,]
DT::datatable(temp)
fwrite(temp, file = paste0(OUT_loc, "/", Today, ".BC.DEG.Targets.txt"),
quote = FALSE,
sep = "\t",
showProgress = FALSE, verbose = FALSE)
Comparison between the mast cell communities (KIT+), and all other communities.
N_GENES=20552
MC.markers <- FindMarkers(object = scRNAseqData,
ident.1 = c("KIT+ MC"),
ident.2 = c("CD14+CD68+ M I",
"CD14+CD68+ M II",
"CD14+CD68+ M III",
"CD3+CD8A+ T I",
"CD3+CD8A+ T II ",
"CD3+CD8A+ T III",
"CD3+CD4+ T I",
"CD3+CD4+ T II",
"CD3+ Treg",
"CD34+ EC I", "CD34+ EC II",
"Mixed I",
"Mixed II",
"ACTA2+ SMC",
"NCAM1+ NK",
# "KIT+ MC",
"CD79A+ B I",
"CD79A+ B II"))
| | 0 % ~calculating
|+ | 1 % ~43s
|++ | 2 % ~41s
|++ | 3 % ~39s
|+++ | 4 % ~37s
|+++ | 5 % ~36s
|++++ | 6 % ~35s
|++++ | 7 % ~34s
|+++++ | 8 % ~34s
|+++++ | 9 % ~33s
|++++++ | 10% ~32s
|++++++ | 11% ~32s
|+++++++ | 12% ~32s
|+++++++ | 13% ~32s
|++++++++ | 14% ~31s
|++++++++ | 15% ~31s
|+++++++++ | 16% ~31s
|+++++++++ | 17% ~45s
|++++++++++ | 18% ~44s
|++++++++++ | 19% ~43s
|+++++++++++ | 20% ~41s
|+++++++++++ | 21% ~40s
|++++++++++++ | 22% ~39s
|++++++++++++ | 23% ~38s
|+++++++++++++ | 24% ~37s
|+++++++++++++ | 25% ~36s
|++++++++++++++ | 26% ~35s
|++++++++++++++ | 27% ~35s
|+++++++++++++++ | 28% ~34s
|+++++++++++++++ | 29% ~33s
|++++++++++++++++ | 30% ~32s
|++++++++++++++++ | 31% ~31s
|+++++++++++++++++ | 32% ~31s
|+++++++++++++++++ | 33% ~30s
|++++++++++++++++++ | 34% ~29s
|++++++++++++++++++ | 35% ~29s
|+++++++++++++++++++ | 36% ~28s
|+++++++++++++++++++ | 37% ~28s
|++++++++++++++++++++ | 38% ~27s
|++++++++++++++++++++ | 39% ~27s
|+++++++++++++++++++++ | 40% ~26s
|+++++++++++++++++++++ | 41% ~26s
|++++++++++++++++++++++ | 42% ~25s
|++++++++++++++++++++++ | 43% ~25s
|+++++++++++++++++++++++ | 44% ~24s
|+++++++++++++++++++++++ | 45% ~23s
|++++++++++++++++++++++++ | 46% ~23s
|++++++++++++++++++++++++ | 47% ~22s
|+++++++++++++++++++++++++ | 48% ~22s
|+++++++++++++++++++++++++ | 49% ~21s
|++++++++++++++++++++++++++ | 51% ~21s
|++++++++++++++++++++++++++ | 52% ~21s
|+++++++++++++++++++++++++++ | 53% ~20s
|+++++++++++++++++++++++++++ | 54% ~20s
|++++++++++++++++++++++++++++ | 55% ~19s
|++++++++++++++++++++++++++++ | 56% ~19s
|+++++++++++++++++++++++++++++ | 57% ~18s
|+++++++++++++++++++++++++++++ | 58% ~18s
|++++++++++++++++++++++++++++++ | 59% ~17s
|++++++++++++++++++++++++++++++ | 60% ~17s
|+++++++++++++++++++++++++++++++ | 61% ~16s
|+++++++++++++++++++++++++++++++ | 62% ~16s
|++++++++++++++++++++++++++++++++ | 63% ~16s
|++++++++++++++++++++++++++++++++ | 64% ~15s
|+++++++++++++++++++++++++++++++++ | 65% ~15s
|+++++++++++++++++++++++++++++++++ | 66% ~14s
|++++++++++++++++++++++++++++++++++ | 67% ~14s
|++++++++++++++++++++++++++++++++++ | 68% ~13s
|+++++++++++++++++++++++++++++++++++ | 69% ~13s
|+++++++++++++++++++++++++++++++++++ | 70% ~13s
|++++++++++++++++++++++++++++++++++++ | 71% ~12s
|++++++++++++++++++++++++++++++++++++ | 72% ~12s
|+++++++++++++++++++++++++++++++++++++ | 73% ~11s
|+++++++++++++++++++++++++++++++++++++ | 74% ~11s
|++++++++++++++++++++++++++++++++++++++ | 75% ~10s
|++++++++++++++++++++++++++++++++++++++ | 76% ~10s
|+++++++++++++++++++++++++++++++++++++++ | 77% ~10s
|+++++++++++++++++++++++++++++++++++++++ | 78% ~09s
|++++++++++++++++++++++++++++++++++++++++ | 79% ~09s
|++++++++++++++++++++++++++++++++++++++++ | 80% ~08s
|+++++++++++++++++++++++++++++++++++++++++ | 81% ~08s
|+++++++++++++++++++++++++++++++++++++++++ | 82% ~07s
|++++++++++++++++++++++++++++++++++++++++++ | 83% ~07s
|++++++++++++++++++++++++++++++++++++++++++ | 84% ~07s
|+++++++++++++++++++++++++++++++++++++++++++ | 85% ~06s
|+++++++++++++++++++++++++++++++++++++++++++ | 86% ~06s
|++++++++++++++++++++++++++++++++++++++++++++ | 87% ~05s
|++++++++++++++++++++++++++++++++++++++++++++ | 88% ~05s
|+++++++++++++++++++++++++++++++++++++++++++++ | 89% ~05s
|+++++++++++++++++++++++++++++++++++++++++++++ | 90% ~04s
|++++++++++++++++++++++++++++++++++++++++++++++ | 91% ~04s
|++++++++++++++++++++++++++++++++++++++++++++++ | 92% ~03s
|+++++++++++++++++++++++++++++++++++++++++++++++ | 93% ~03s
|+++++++++++++++++++++++++++++++++++++++++++++++ | 94% ~02s
|++++++++++++++++++++++++++++++++++++++++++++++++ | 95% ~02s
|++++++++++++++++++++++++++++++++++++++++++++++++ | 96% ~02s
|+++++++++++++++++++++++++++++++++++++++++++++++++ | 97% ~01s
|+++++++++++++++++++++++++++++++++++++++++++++++++ | 98% ~01s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 99% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=40s
DT::datatable(MC.markers)
MC_Volcano_TargetsA = EnhancedVolcano(MC.markers,
lab = rownames(MC.markers),
x = "avg_log2FC",
y = "p_val_adj",
selectLab = target_genes_qc,
axisLabSize = 12,
xlab = "average fold-change",
title = "Mast cell markers\n(Mast cell communities vs the rest)",
titleLabSize = 14,
pCutoff = 0.05/N_GENES, # 20552 genes
FCcutoff = 1.25,
pointSize = 1.5,
labSize = 3.0,
legendLabels =c('NS','avg. fold-change','P',
'P & avg. fold-change'),
legendPosition = "right",
legendLabSize = 10,
legendIconSize = 3.0,
drawConnectors = TRUE,
widthConnectors = 0.2,
colConnectors = "#595A5C",
gridlines.major = FALSE,
gridlines.minor = FALSE)
MC_Volcano_TargetsA
ggsave(paste0(PLOT_loc, "/", Today, ".Volcano.MC.DEG.Targets.pdf"),
plot = MC_Volcano_TargetsA)
Saving 7.29 x 4.51 in image
The target results are given below and written to a file.
library(tibble)
MC.markers <- add_column(MC.markers, Gene = row.names(MC.markers), .before = 1)
temp <- MC.markers[MC.markers$Gene %in% target_genes_qc,]
DT::datatable(temp)
fwrite(temp, file = paste0(OUT_loc, "/", Today, ".MC.DEG.Targets.txt"),
quote = FALSE,
sep = "\t",
showProgress = FALSE, verbose = FALSE)
Comparison between the natural killer cell communities (NCAM1+), and all other communities.
N_GENES=20552
NK.markers <- FindMarkers(object = scRNAseqData,
ident.1 = c("NCAM1+ NK"),
ident.2 = c("CD14+CD68+ M I",
"CD14+CD68+ M II",
"CD14+CD68+ M III",
"CD3+CD8A+ T I",
"CD3+CD8A+ T II ",
"CD3+CD8A+ T III",
"CD3+CD4+ T I",
"CD3+CD4+ T II",
"CD3+ Treg",
"CD34+ EC I", "CD34+ EC II",
"Mixed I",
"Mixed II",
#"NCAM1+ NK",
"ACTA2+ SMC",
"KIT+ MC",
"CD79A+ B I",
"CD79A+ B II"))
| | 0 % ~calculating
|+ | 1 % ~20s
|++ | 2 % ~19s
|++ | 3 % ~19s
|+++ | 4 % ~22s
|+++ | 5 % ~22s
|++++ | 6 % ~21s
|++++ | 7 % ~21s
|+++++ | 8 % ~23s
|+++++ | 9 % ~22s
|++++++ | 10% ~22s
|++++++ | 11% ~21s
|+++++++ | 12% ~20s
|+++++++ | 13% ~20s
|++++++++ | 14% ~19s
|++++++++ | 15% ~19s
|+++++++++ | 16% ~19s
|+++++++++ | 17% ~18s
|++++++++++ | 18% ~18s
|++++++++++ | 19% ~18s
|+++++++++++ | 20% ~17s
|+++++++++++ | 21% ~17s
|++++++++++++ | 22% ~17s
|++++++++++++ | 23% ~16s
|+++++++++++++ | 24% ~16s
|+++++++++++++ | 25% ~16s
|++++++++++++++ | 26% ~16s
|++++++++++++++ | 27% ~15s
|+++++++++++++++ | 28% ~15s
|+++++++++++++++ | 29% ~15s
|++++++++++++++++ | 30% ~15s
|++++++++++++++++ | 31% ~14s
|+++++++++++++++++ | 32% ~14s
|+++++++++++++++++ | 33% ~14s
|++++++++++++++++++ | 34% ~14s
|++++++++++++++++++ | 35% ~13s
|+++++++++++++++++++ | 36% ~13s
|+++++++++++++++++++ | 37% ~13s
|++++++++++++++++++++ | 38% ~13s
|++++++++++++++++++++ | 39% ~13s
|+++++++++++++++++++++ | 40% ~12s
|+++++++++++++++++++++ | 41% ~12s
|++++++++++++++++++++++ | 42% ~12s
|++++++++++++++++++++++ | 43% ~12s
|+++++++++++++++++++++++ | 44% ~11s
|+++++++++++++++++++++++ | 45% ~11s
|++++++++++++++++++++++++ | 46% ~11s
|++++++++++++++++++++++++ | 47% ~11s
|+++++++++++++++++++++++++ | 48% ~11s
|+++++++++++++++++++++++++ | 49% ~11s
|++++++++++++++++++++++++++ | 51% ~11s
|++++++++++++++++++++++++++ | 52% ~10s
|+++++++++++++++++++++++++++ | 53% ~10s
|+++++++++++++++++++++++++++ | 54% ~10s
|++++++++++++++++++++++++++++ | 55% ~10s
|++++++++++++++++++++++++++++ | 56% ~09s
|+++++++++++++++++++++++++++++ | 57% ~09s
|+++++++++++++++++++++++++++++ | 58% ~09s
|++++++++++++++++++++++++++++++ | 59% ~09s
|++++++++++++++++++++++++++++++ | 60% ~09s
|+++++++++++++++++++++++++++++++ | 61% ~08s
|+++++++++++++++++++++++++++++++ | 62% ~08s
|++++++++++++++++++++++++++++++++ | 63% ~08s
|++++++++++++++++++++++++++++++++ | 64% ~08s
|+++++++++++++++++++++++++++++++++ | 65% ~08s
|+++++++++++++++++++++++++++++++++ | 66% ~07s
|++++++++++++++++++++++++++++++++++ | 67% ~07s
|++++++++++++++++++++++++++++++++++ | 68% ~07s
|+++++++++++++++++++++++++++++++++++ | 69% ~07s
|+++++++++++++++++++++++++++++++++++ | 70% ~06s
|++++++++++++++++++++++++++++++++++++ | 71% ~06s
|++++++++++++++++++++++++++++++++++++ | 72% ~06s
|+++++++++++++++++++++++++++++++++++++ | 73% ~06s
|+++++++++++++++++++++++++++++++++++++ | 74% ~06s
|++++++++++++++++++++++++++++++++++++++ | 75% ~05s
|++++++++++++++++++++++++++++++++++++++ | 76% ~05s
|+++++++++++++++++++++++++++++++++++++++ | 77% ~05s
|+++++++++++++++++++++++++++++++++++++++ | 78% ~05s
|++++++++++++++++++++++++++++++++++++++++ | 79% ~05s
|++++++++++++++++++++++++++++++++++++++++ | 80% ~04s
|+++++++++++++++++++++++++++++++++++++++++ | 81% ~04s
|+++++++++++++++++++++++++++++++++++++++++ | 82% ~04s
|++++++++++++++++++++++++++++++++++++++++++ | 83% ~04s
|++++++++++++++++++++++++++++++++++++++++++ | 84% ~04s
|+++++++++++++++++++++++++++++++++++++++++++ | 85% ~03s
|+++++++++++++++++++++++++++++++++++++++++++ | 86% ~03s
|++++++++++++++++++++++++++++++++++++++++++++ | 87% ~03s
|++++++++++++++++++++++++++++++++++++++++++++ | 88% ~03s
|+++++++++++++++++++++++++++++++++++++++++++++ | 89% ~02s
|+++++++++++++++++++++++++++++++++++++++++++++ | 90% ~02s
|++++++++++++++++++++++++++++++++++++++++++++++ | 91% ~02s
|++++++++++++++++++++++++++++++++++++++++++++++ | 92% ~02s
|+++++++++++++++++++++++++++++++++++++++++++++++ | 93% ~02s
|+++++++++++++++++++++++++++++++++++++++++++++++ | 94% ~01s
|++++++++++++++++++++++++++++++++++++++++++++++++ | 95% ~01s
|++++++++++++++++++++++++++++++++++++++++++++++++ | 96% ~01s
|+++++++++++++++++++++++++++++++++++++++++++++++++ | 97% ~01s
|+++++++++++++++++++++++++++++++++++++++++++++++++ | 98% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 99% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=22s
DT::datatable(NK.markers)
NK_Volcano_TargetsA = EnhancedVolcano(NK.markers,
lab = rownames(NK.markers),
x = "avg_log2FC",
y = "p_val_adj",
selectLab = target_genes_qc,
axisLabSize = 12,
xlab = "average fold-change",
title = "NK markers\n(NK-cell communities vs the rest)",
titleLabSize = 14,
pCutoff = 0.05/N_GENES, # 20552 genes
FCcutoff = 1.25,
pointSize = 1.5,
labSize = 3.0,
legendLabels =c('NS','avg. fold-change','P',
'P & avg. fold-change'),
legendPosition = "right",
legendLabSize = 10,
legendIconSize = 3.0,
drawConnectors = TRUE,
widthConnectors = 0.2,
colConnectors = "#595A5C",
gridlines.major = FALSE,
gridlines.minor = FALSE)
NK_Volcano_TargetsA
ggsave(paste0(PLOT_loc, "/", Today, ".Volcano.NK.DEG.Targets.pdf"),
plot = NK_Volcano_TargetsA)
Saving 7.29 x 4.51 in image
The target results are given below and written to a file.
library(tibble)
NK.markers <- add_column(NK.markers, Gene = row.names(NK.markers), .before = 1)
temp <- NK.markers[NK.markers$Gene %in% target_genes_qc,]
DT::datatable(temp)
fwrite(temp, file = paste0(OUT_loc, "/", Today, ".NK.DEG.Targets.txt"),
quote = FALSE,
sep = "\t",
showProgress = FALSE, verbose = FALSE)
Comparison between the mixed cell communities, and all other communities.
N_GENES=20552
MIXED.markers <- FindMarkers(object = scRNAseqData,
ident.1 = c("Mixed I",
"Mixed II"),
ident.2 = c("CD14+CD68+ M I",
"CD14+CD68+ M II",
"CD14+CD68+ M III",
"CD3+CD8A+ T I",
"CD3+CD8A+ T II ",
"CD3+CD8A+ T III",
"CD3+CD4+ T I",
"CD3+CD4+ T II",
"CD3+ Treg",
"CD34+ EC I", "CD34+ EC II",
# "Mixed I",
# "Mixed II",
"ACTA2+ SMC",
"NCAM1+ NK",
"KIT+ MC",
"CD79A+ B I",
"CD79A+ B II"))
| | 0 % ~calculating
|+ | 1 % ~01m 18s
|++ | 2 % ~01m 16s
|++ | 3 % ~01m 14s
|+++ | 4 % ~01m 11s
|+++ | 5 % ~01m 10s
|++++ | 6 % ~01m 09s
|++++ | 7 % ~01m 08s
|+++++ | 8 % ~01m 07s
|+++++ | 9 % ~01m 06s
|++++++ | 10% ~01m 05s
|++++++ | 11% ~01m 08s
|+++++++ | 12% ~01m 07s
|+++++++ | 13% ~01m 06s
|++++++++ | 14% ~01m 05s
|++++++++ | 15% ~01m 04s
|+++++++++ | 16% ~01m 03s
|+++++++++ | 17% ~01m 01s
|++++++++++ | 18% ~60s
|++++++++++ | 19% ~59s
|+++++++++++ | 20% ~01m 17s
|+++++++++++ | 21% ~01m 15s
|++++++++++++ | 22% ~01m 13s
|++++++++++++ | 23% ~01m 11s
|+++++++++++++ | 24% ~01m 09s
|+++++++++++++ | 26% ~01m 07s
|++++++++++++++ | 27% ~01m 06s
|++++++++++++++ | 28% ~01m 04s
|+++++++++++++++ | 29% ~01m 02s
|+++++++++++++++ | 30% ~01m 02s
|++++++++++++++++ | 31% ~01m 01s
|++++++++++++++++ | 32% ~01m 00s
|+++++++++++++++++ | 33% ~59s
|+++++++++++++++++ | 34% ~58s
|++++++++++++++++++ | 35% ~58s
|++++++++++++++++++ | 36% ~56s
|+++++++++++++++++++ | 37% ~55s
|+++++++++++++++++++ | 38% ~54s
|++++++++++++++++++++ | 39% ~53s
|++++++++++++++++++++ | 40% ~52s
|+++++++++++++++++++++ | 41% ~51s
|+++++++++++++++++++++ | 42% ~50s
|++++++++++++++++++++++ | 43% ~50s
|++++++++++++++++++++++ | 44% ~49s
|+++++++++++++++++++++++ | 45% ~48s
|+++++++++++++++++++++++ | 46% ~47s
|++++++++++++++++++++++++ | 47% ~46s
|++++++++++++++++++++++++ | 48% ~45s
|+++++++++++++++++++++++++ | 49% ~44s
|+++++++++++++++++++++++++ | 50% ~43s
|++++++++++++++++++++++++++ | 51% ~43s
|+++++++++++++++++++++++++++ | 52% ~42s
|+++++++++++++++++++++++++++ | 53% ~41s
|++++++++++++++++++++++++++++ | 54% ~40s
|++++++++++++++++++++++++++++ | 55% ~39s
|+++++++++++++++++++++++++++++ | 56% ~38s
|+++++++++++++++++++++++++++++ | 57% ~37s
|++++++++++++++++++++++++++++++ | 58% ~37s
|++++++++++++++++++++++++++++++ | 59% ~36s
|+++++++++++++++++++++++++++++++ | 60% ~35s
|+++++++++++++++++++++++++++++++ | 61% ~34s
|++++++++++++++++++++++++++++++++ | 62% ~33s
|++++++++++++++++++++++++++++++++ | 63% ~32s
|+++++++++++++++++++++++++++++++++ | 64% ~31s
|+++++++++++++++++++++++++++++++++ | 65% ~31s
|++++++++++++++++++++++++++++++++++ | 66% ~30s
|++++++++++++++++++++++++++++++++++ | 67% ~29s
|+++++++++++++++++++++++++++++++++++ | 68% ~28s
|+++++++++++++++++++++++++++++++++++ | 69% ~27s
|++++++++++++++++++++++++++++++++++++ | 70% ~26s
|++++++++++++++++++++++++++++++++++++ | 71% ~25s
|+++++++++++++++++++++++++++++++++++++ | 72% ~24s
|+++++++++++++++++++++++++++++++++++++ | 73% ~23s
|++++++++++++++++++++++++++++++++++++++ | 74% ~22s
|++++++++++++++++++++++++++++++++++++++ | 76% ~21s
|+++++++++++++++++++++++++++++++++++++++ | 77% ~20s
|+++++++++++++++++++++++++++++++++++++++ | 78% ~19s
|++++++++++++++++++++++++++++++++++++++++ | 79% ~19s
|++++++++++++++++++++++++++++++++++++++++ | 80% ~18s
|+++++++++++++++++++++++++++++++++++++++++ | 81% ~17s
|+++++++++++++++++++++++++++++++++++++++++ | 82% ~16s
|++++++++++++++++++++++++++++++++++++++++++ | 83% ~15s
|++++++++++++++++++++++++++++++++++++++++++ | 84% ~14s
|+++++++++++++++++++++++++++++++++++++++++++ | 85% ~13s
|+++++++++++++++++++++++++++++++++++++++++++ | 86% ~12s
|++++++++++++++++++++++++++++++++++++++++++++ | 87% ~11s
|++++++++++++++++++++++++++++++++++++++++++++ | 88% ~10s
|+++++++++++++++++++++++++++++++++++++++++++++ | 89% ~09s
|+++++++++++++++++++++++++++++++++++++++++++++ | 90% ~09s
|++++++++++++++++++++++++++++++++++++++++++++++ | 91% ~08s
|++++++++++++++++++++++++++++++++++++++++++++++ | 92% ~07s
|+++++++++++++++++++++++++++++++++++++++++++++++ | 93% ~06s
|+++++++++++++++++++++++++++++++++++++++++++++++ | 94% ~05s
|++++++++++++++++++++++++++++++++++++++++++++++++ | 95% ~04s
|++++++++++++++++++++++++++++++++++++++++++++++++ | 96% ~03s
|+++++++++++++++++++++++++++++++++++++++++++++++++ | 97% ~03s
|+++++++++++++++++++++++++++++++++++++++++++++++++ | 98% ~02s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 99% ~01s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=01m 23s
DT::datatable(MIXED.markers)
MIXED_Volcano_TargetsA = EnhancedVolcano(MIXED.markers,
lab = rownames(MIXED.markers),
x = "avg_log2FC",
y = "p_val_adj",
selectLab = target_genes_qc,
axisLabSize = 12,
xlab = "average fold-change",
title = "Mixed markers\n(Mixed cell communities vs the rest)",
titleLabSize = 14,
pCutoff = 0.05/N_GENES, # 20552 genes
FCcutoff = 1.25,
pointSize = 1.5,
labSize = 3.0,
legendLabels =c('NS','avg. fold-change','P',
'P & avg. fold-change'),
legendPosition = "right",
legendLabSize = 10,
legendIconSize = 3.0,
drawConnectors = TRUE,
widthConnectors = 0.2,
colConnectors = "#595A5C",
gridlines.major = FALSE,
gridlines.minor = FALSE)
MIXED_Volcano_TargetsA
ggsave(paste0(PLOT_loc, "/", Today, ".Volcano.MIXED.DEG.Targets.pdf"),
plot = MIXED_Volcano_TargetsA)
Saving 7.29 x 4.51 in image
The target results are given below and written to a file.
library(tibble)
MIXED.markers <- add_column(MIXED.markers, Gene = row.names(MIXED.markers), .before = 1)
temp <- MIXED.markers[MIXED.markers$Gene %in% target_genes_qc,]
DT::datatable(temp)
fwrite(temp, file = paste0(OUT_loc, "/", Today, ".MIXED.DEG.Targets.txt"),
quote = FALSE,
sep = "\t",
showProgress = FALSE, verbose = FALSE)
Dotplots of known and novel genes.
Some genes were not found in our data.
library(RColorBrewer)
# "C6orf195" "EDN1" "PHACTR1" "TBC1D7" "GFOD1" "ENPP1" "ENPP3" "IGFBP3"
# "AC011294.3" "MTAP" "RP11-145E5.5" "C9orf53" "CDKN2A" "CDKN2B" "ZNF485" "ZNF32"
# "AL137026.1" "ARID5B" "RTKN2" "CAMK2G" "VCL" "AP3M1" "ADK" "KAT6B"
# "DUPD1" "DUSP13" "SAMD8" "VDAC2" "COMTD1" "FGF23" "COL4A1" "COL4A2"
# "CHRNA5" "CHRNB4" "ADAMTS7" "MORF4L1" "CTSH" "BCAM" "PVRL2" "TOMM40"
# "APOE" "APOC1"
tophits_known <- c("PHACTR1", "CDKN2B-AS1","APOE") # DMRTA1 not found in the data
tophits_novel <- c("ENPP3", "ENPP1", "IGFBP3","ARID5B","ADK", "FGF23", "COL4A2", "ADAMTS7", "MORF4L1") # "LINC00841", "LOC100130539" not found in the data
p1 <- DotPlot(scRNAseqData, features = tophits_known,
cols = "RdBu")
p1 + theme(axis.text.x = element_text(angle = 45, hjust=1, size = 5))
ggsave(paste0(PLOT_loc, "/", Today, ".DotPlot.TopHits.known.png"), plot = last_plot())
Saving 7.29 x 4.51 in image
ggsave(paste0(PLOT_loc, "/", Today, ".DotPlot.TopHits.known.ps"), plot = last_plot())
Saving 7.29 x 4.51 in image
rm(p1)
p1 <- DotPlot(scRNAseqData, features = tophits_novel,
cols = "RdBu")
p1 + theme(axis.text.x = element_text(angle = 45, hjust=1, size = 5))
ggsave(paste0(PLOT_loc, "/", Today, ".DotPlot.TopHits.novel.png"), plot = last_plot())
Saving 7.29 x 4.51 in image
ggsave(paste0(PLOT_loc, "/", Today, ".DotPlot.TopHits.novel.ps"), plot = last_plot())
Saving 7.29 x 4.51 in image
rm(p1)
Version: v1.0.2
Last update: 2021-07-15
Written by: Sander W. van der Laan (s.w.vanderlaan-2[at]umcutrecht.nl).
Description: Script to load single-cell RNA sequencing (scRNAseq) data, and perform quality control (QC), and initial mapping to cells.
Minimum requirements: R version 3.5.2 (2018-12-20) -- 'Eggshell Igloo', macOS Mojave (10.14.2).
Change log
* v1.0.2 Update to the gene list, workflow, and dataset.
* v1.0.1 Update to the gene list.
* v1.0.0 Initial version
sessionInfo()
R version 4.1.0 (2021-05-18)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 11.4
Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] parallel stats4 tools stats graphics grDevices utils datasets methods base
other attached packages:
[1] RColorBrewer_1.1-2 labelled_2.8.0 openxlsx_4.2.4 SeuratObject_4.0.2 Seurat_4.0.1
[6] devtools_2.4.2 usethis_2.0.1 tableone_0.13.0 haven_2.4.1 EnhancedVolcano_1.10.0
[11] ggrepel_0.9.1 mygene_1.28.0 GenomicFeatures_1.44.0 GenomicRanges_1.44.0 GenomeInfoDb_1.28.1
[16] org.Hs.eg.db_3.13.0 AnnotationDbi_1.54.1 IRanges_2.26.0 S4Vectors_0.30.0 Biobase_2.52.0
[21] BiocGenerics_0.38.0 DT_0.18 knitr_1.33 forcats_0.5.1 stringr_1.4.0
[26] purrr_0.3.4 tibble_3.1.2 ggplot2_3.3.5 tidyverse_1.3.1 data.table_1.14.0
[31] naniar_0.6.1 tidylog_1.0.2 tidyr_1.1.3 dplyr_1.0.7 optparse_1.6.6
[36] readr_1.4.0
loaded via a namespace (and not attached):
[1] rappdirs_0.3.3 rtracklayer_1.52.0 scattermore_0.7 ragg_1.1.3
[5] visdat_0.5.3 bit64_4.0.5 irlba_2.3.3 DelayedArray_0.18.0
[9] rpart_4.1-15 KEGGREST_1.32.0 RCurl_1.98-1.3 generics_0.1.0
[13] callr_3.7.0 cowplot_1.1.1 RSQLite_2.2.7 RANN_2.6.1
[17] proxy_0.4-26 future_1.21.0 chron_2.3-56 bit_4.0.4
[21] spatstat.data_2.1-0 xml2_1.3.2 lubridate_1.7.10 httpuv_1.6.1
[25] SummarizedExperiment_1.22.0 assertthat_0.2.1 xfun_0.24 jquerylib_0.1.4
[29] hms_1.1.0 evaluate_0.14 promises_1.2.0.1 fansi_0.5.0
[33] restfulr_0.0.13 progress_1.2.2 dbplyr_2.1.1 readxl_1.3.1
[37] igraph_1.2.6 DBI_1.1.1 htmlwidgets_1.5.3 spatstat.geom_2.2-2
[41] ellipsis_0.3.2 crosstalk_1.1.1 backports_1.2.1 survey_4.0
[45] biomaRt_2.48.2 deldir_0.2-10 MatrixGenerics_1.4.0 vctrs_0.3.8
[49] remotes_2.4.0 ROCR_1.0-11 abind_1.4-5 cachem_1.0.5
[53] withr_2.4.2 checkmate_2.0.0 sctransform_0.3.2 GenomicAlignments_1.28.0
[57] prettyunits_1.1.1 getopt_1.20.3 goftest_1.2-2 cluster_2.1.2
[61] lazyeval_0.2.2 crayon_1.4.1 labeling_0.4.2 pkgconfig_2.0.3
[65] pkgload_1.2.1 nlme_3.1-152 vipor_0.4.5 nnet_7.3-16
[69] rlang_0.4.11 globals_0.14.0 lifecycle_1.0.0 miniUI_0.1.1.1
[73] filelock_1.0.2 extrafontdb_1.0 BiocFileCache_2.0.0 modelr_0.1.8
[77] rprojroot_2.0.2 ggrastr_0.2.3 cellranger_1.1.0 polyclip_1.10-0
[81] matrixStats_0.59.0 lmtest_0.9-38 Matrix_1.3-4 zoo_1.8-9
[85] reprex_2.0.0 base64enc_0.1-3 beeswarm_0.4.0 processx_3.5.2
[89] ggridges_0.5.3 png_0.1-7 viridisLite_0.4.0 rjson_0.2.20
[93] clisymbols_1.2.0 bitops_1.0-7 KernSmooth_2.23-20 Biostrings_2.60.1
[97] blob_1.2.1 parallelly_1.26.1 jpeg_0.1-8.1 scales_1.1.1
[101] memoise_2.0.0 magrittr_2.0.1 plyr_1.8.6 ica_1.0-2
[105] zlibbioc_1.38.0 compiler_4.1.0 BiocIO_1.2.0 ash_1.0-15
[109] fitdistrplus_1.1-5 Rsamtools_2.8.0 cli_3.0.0 XVector_0.32.0
[113] listenv_0.8.0 ps_1.6.0 patchwork_1.1.1 pbapply_1.4-3
[117] htmlTable_2.2.1 Formula_1.2-4 MASS_7.3-54 mgcv_1.8-36
[121] tidyselect_1.1.1 stringi_1.7.2 textshaping_0.3.5 proj4_1.0-10.1
[125] mitools_2.4 yaml_2.2.1 latticeExtra_0.6-29 grid_4.1.0
[129] sass_0.4.0 future.apply_1.7.0 rstudioapi_0.13 foreign_0.8-81
[133] gridExtra_2.3 farver_2.1.0 Rtsne_0.15 digest_0.6.27
[137] shiny_1.6.0 proto_1.0.0 Rcpp_1.0.7 broom_0.7.8
[141] ggalt_0.4.0 later_1.2.0 RcppAnnoy_0.0.18 httr_1.4.2
[145] colorspace_2.0-2 rvest_1.0.0 XML_3.99-0.6 fs_1.5.0
[149] tensor_1.5 reticulate_1.20 splines_4.1.0 uwot_0.1.10
[153] spatstat.utils_2.2-0 systemfonts_1.0.2 sessioninfo_1.1.1 plotly_4.9.4.1
[157] xtable_1.8-4 jsonlite_1.7.2 testthat_3.0.4 R6_2.5.0
[161] Hmisc_4.5-0 gsubfn_0.7 pillar_1.6.1 htmltools_0.5.1.1
[165] mime_0.11 glue_1.4.2 fastmap_1.1.0 BiocParallel_1.26.1
[169] class_7.3-19 codetools_0.2-18 maps_3.3.0 pkgbuild_1.2.0
[173] utf8_1.2.1 bslib_0.2.5.1 lattice_0.20-44 spatstat.sparse_2.0-0
[177] sqldf_0.4-11 curl_4.3.2 ggbeeswarm_0.6.0 leiden_0.3.8
[181] zip_2.2.0 Rttf2pt1_1.3.8 survival_3.2-11 rmarkdown_2.9
[185] desc_1.3.0 munsell_0.5.0 e1071_1.7-7 GenomeInfoDbData_1.2.6
[189] reshape2_1.4.4 gtable_0.3.0 spatstat.core_2.2-0 extrafont_0.17
save.image(paste0(PROJECT_loc, "/",Today,".",PROJECTNAME,".scrnaseq_results.RData"))
| © 1979-2021 Sander W. van der Laan | s.w.vanderlaan-2[at]umcutrecht.nl | swvanderlaan.github.io. |